key-bindings – Teclas de flecha en el mini búfer del timón

Pregunta:

Soy un principiante en modo timón.

¿Por qué la reasignación de teclas de flecha ( (kbd "<left>") , (kbd "right") , …) en helm-map no funciona mientras que otras funcionan bien?

Aquí están todos los ajustes:

(require 'helm-config)
(helm-mode 1)
(define-key global-map (kbd "C-;") 'helm-mini)
(define-key global-map (kbd "M-y") 'helm-show-kill-ring)
(define-key global-map (kbd "C-x C-r") 'helm-recentf)
(define-key global-map [remap find-file] 'helm-find-files) ;
(define-key global-map [remap execute-extended-command] 'helm-M-x)
(define-key helm-map (kbd "C-h") 'delete-backward-char)
(define-key helm-find-files-map (kbd "<left>") 'backward-char)
(define-key helm-find-files-map (kbd "<right>") 'forward-char)

;; no effects and default key bind works for following two lines
(define-key helm-map (kbd "<left>") 'backward-char)
(define-key helm-map (kbd "<right>") 'forward-char)

Gracias.

Respuesta:

Busqué en el repositorio de GitHub por "izquierda", luego el problema se resolvió insertando (setq helm-ff-lynx-style-map nil) antes (helm-mode 1) .

https://github.com/emacs-helm/helm/blob/91ced00ad8bac63ca1311a39b0045677f9b2caae/helm-files.el#L409

Por lo tanto, mi configuración completa será la siguiente:

(require 'helm-config)
(setq helm-ff-lynx-style-map nil)
(helm-mode 1)
(define-key global-map (kbd "C-;") 'helm-mini)
(define-key global-map (kbd "M-y") 'helm-show-kill-ring)
(define-key global-map (kbd "C-x C-r") 'helm-recentf)
(define-key global-map [remap find-file] 'helm-find-files) ;
(define-key global-map [remap execute-extended-command] 'helm-M-x)
(define-key helm-map (kbd "C-h") 'delete-backward-char)
(define-key helm-map (kbd "<left>") 'backward-char)
(define-key helm-map (kbd "<right>") 'forward-char)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top

web tasarım