What are good custom keybindings in emacs?

后端 未结 5 552
醉梦人生
醉梦人生 2021-02-05 15:35

Emacs seems to have all the possible keyboard combinations already randomly distributed among it\'s commands. :p

If I am to define new keyboard shortcuts, where should I

5条回答
  •  悲哀的现实
    2021-02-05 16:17

    By default, C-x h marks the whole buffer, and C-M-\ runs indent-region, so doing those two one after the other will indent the whole buffer.

    comment-dwim is already bound by default to M-;, and probably does better than comment-or-uncomment-region. ("DWIM" stands for "do-what-I-mean")

    For completion, I recommend setting up auto-complete-mode, which interoperates with rsense. Auto-complete has standard keybindings for all completion.

    As for rdebug, I would probably just stick it on one of the F-keys, or else something prefixed by C-c, since that is the sort-of designated "custom" prefix. Maybe C-c d for "Debug". To make sure that the key is not already bound, go to a ruby buffer and press C-h k and then press your key combination, and make sure that Emacs tells you that is is undefined.

提交回复
热议问题