5

I wan't to switch the keybinding in helm-find-files when I go one level up or go in to a folder. Now it looks like:

  • "C-j" -> go in to the folder
  • "C-l" -> go one level up

For me, it's intuitive to switch them, so it will be the following:

  • "C-j" -> go one level up
  • "C-l" -> go in to the folder

I could replace the "C-j" to the one I wanted with this:

(define-key helm-map (kbd "C-j") 'helm-find-files-up-one-level)

I don't know what's the action's name to "go in to the folder". If I find it out, that could be a solution.

5

When running helm-find-files, you should be able to use C-h k C-j to find out what command will be run by C-j, for me, it gives:

C-j runs the command helm-execute-persistent-action (found in helm-find-files-map), which is an interactive Lisp closure in ‘helm.el’.

It is bound to , C-j, C-z.

(helm-execute-persistent-action &optional (ATTR 'persistent-action) SPLIT-ONEWINDOW)

and to avoid affecting the key bindings in other helm commands, you should change helm-find-files-map instead of helm-map, so the following is probably what you want:

(define-key helm-find-files-map (kbd "C-j") 'helm-find-files-up-one-level)
(define-key helm-find-files-map (kbd "C-l") 'helm-execute-persistent-action)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.