Explore key-chord mode in Emacs
Default key-chord mode in Prelude
Today I read the source codes of Prelude, except for knowing some new global key bindings, the most interesting one is the key-chord mode. Maybe I came from vi, so the double pressing key is familiar for me. And I enjoy that a lot. So I write down it as a note for its usage. :P
Predlude set key-chord mode enabled by default, of course it can be turned off by:
(key-chord-mode -1)
This piece of code can be added to the custom.el
file, which is the personal configure file for Prelude. In that case, evil-mode
maybe used to mixture some operations with vi, while I never tried it. Below are the shortcuts and commands in key-chord mode:
jj+`c` jump to a word starts with a character
jl+`c` jump to a line marked with a letter
jk+`c` jump to a word contains a letter
JJ switch to the previous buffer
uu open the undo-tree
ps: I updated the key-chord mode by add a new command in my custom.el
:
(key-chord-define-global "kk" 'prelude-kill-whole-line)
Maybe that needs some tests for several days, I will post any update by then.