Changing keybindings

57 views
Skip to first unread message

kovan

unread,
Mar 28, 2014, 11:39:03 PM3/28/14
to emacs...@googlegroups.com
Hello. I like Helm but I am too used to use TAB for completion and RET for selecting default action, instead of C-z. This is the only thing that prevents me from using helm more. Is there a way to change it?

Thierry Volpiatto

unread,
Mar 29, 2014, 2:10:40 AM3/29/14
to emacs...@googlegroups.com
TAB for completion is non--sense in helm, so it is used to display
actions menu, and RET already select and run default action.

Otherwise helm have multiple keymaps that you can configure as any
keymap in emacs, the main one is `helm-map'.

--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

Javier Sanz

unread,
Mar 29, 2014, 11:52:51 AM3/29/14
to emacs...@googlegroups.com
I just would like a way to, for example, if I am at my home directory and press C-x C-f and enter .ema, be able to press TAB instead of C-z to go into .emacs.d and keep navigating down the directory tree. That is the way the rest of Emacs works and the way the shells work and many other programs, and I like Helm but my muscle memory is so trained to that that I would like that to be posssible. Maybe I am missing something because I haven't used Helm much.

 
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

--
You received this message because you are subscribed to a topic in the Google Groups "emacs-helm" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emacs-helm/Cni_P8GKv_w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emacs-helm+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Heerdegen

unread,
Mar 29, 2014, 1:15:25 PM3/29/14
to emacs...@googlegroups.com
When starting with Helm, I had the same problem. But it is the wrong
track to try to make helm fit your old habits, you won't get happy with
that approach in Helm.

FWIW, for the TAB thing, I used this to unlearn TAB performing
completion:

(define-key helm-map [9]
(helm-make-multi-command
(list
(lambda (&rest _)
(interactive)
(with-temp-message
"Hit tab again to toggle selecting action"
(sit-for 1)))
#'helm-select-action)
.3))

This makes hitting TAB one time just print a message, you need to hit it
twice to get into the action selection.


Michael.

Javier Sanz

unread,
Mar 29, 2014, 2:35:47 PM3/29/14
to emacs...@googlegroups.com
I swapped TAB with C-z and I really love it.

(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
(define-key helm-map (kbd "C-z") 'helm-select-action)

BTW I think this should be the default.

--

Un saludo,

    Javier


Javier Sanz

unread,
Apr 1, 2014, 5:03:11 PM4/1/14
to emacs...@googlegroups.com
Now that I have used Helm more, I have to say that I am impressed. The initial behavior of C-x C-f put me back (1) but in general Helm is really awesome.

I wanted to suggest the keybindings that I am using now. They allow both consistent behaviour with the rest of Emacs/shells (http://en.wikipedia.org/wiki/Principle_of_least_astonishment) and easy navigation alternating C-n with C-tab to switch to next element and execute-persistent-action in the element, something that the bindings in my previous post didn't allow so easily.

(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
(define-key helm-map (kbd "<C-tab>") 'helm-execute-persistent-action)
(define-key helm-map (kbd "C-z") 'helm-select-action)

Keep up the good work,

Javier

(1)  I'm not the only one, the guy at http://steckerhalter.co.vu/steckemacs.html, who as you can see has tried quite a lot of stuff in Emacs, says "I'm not using Helm Find Files to browse files anymore. I tried using it but gave up after a while. I found it to be more cumbersome than ido-mode. But in general I really like to have Helm around"

--

Un saludo,

    Javier

Thierry Volpiatto

unread,
Apr 4, 2014, 1:48:23 AM4/4/14
to emacs...@googlegroups.com

Javier Sanz <jsceb...@gmail.com> writes:

> Now that I have used Helm more, I have to say that I am impressed. The initial
> behavior of C-x C-f put me back (1) but in general Helm is really awesome.

Note that a lot of people are using `find-file' which is helmized by
helm-mode thinking they are using `helm-find-files', it is a different
thing than `helm-find-files' though the navigation is quite the same.

> I wanted to suggest the keybindings that I am using now. They allow both
> consistent behaviour with the rest of Emacs/shells (http://en.wikipedia.org/
> wiki/Principle_of_least_astonishment) and easy navigation alternating C-n with
> C-tab to switch to next element and execute-persistent-action in the element,
> something that the bindings in my previous post didn't allow so easily.
>
> (define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)

Note that C-i == TAB

> (define-key helm-map (kbd "<C-tab>") 'helm-execute-persistent-action)
> (define-key helm-map (kbd "C-z") 'helm-select-action)

Some prefer this, some prefer the default bindings, so as it is
configurable, I prefer leaving the default as it is, up to the user to
configure as he want.

> Keep up the good work,
>
> Javier
>
> (1) I'm not the only one, the guy at http://steckerhalter.co.vu/
> steckemacs.html, who as you can see has tried quite a lot of stuff in Emacs,
> says "I'm not using Helm Find Files to browse files anymore. I tried using it
> but gave up after a while. I found it to be more cumbersome than ido-mode. But
> in general I really like to have Helm around"

The problem is that people are using `helm-find-files' as they use ido,
without knowing all the features of `helm-find-files'.

`helm-find-files' can be compared to a virtual dired from where you can
access to any directory and work from there without opening a new dired
buffer, so it is much more featured than ido and hardly comparable.

Thanks for your feedback.
Reply all
Reply to author
Forward
0 new messages