I would like to do something like
map <C-k> :e#<CR>
in my .vimrc.
However, I recently found that <C-k> is used for digraphs.
How do I get a list of unmapped control keys in vim?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Vim has many commands, so it can be a challenge to find a (memorable and short) key sequence for mappings.
My approach is to use the recommended
<Leader>prefix for things I do not use frequently, but for essential stuff a mapping with Ctrl is useful, indeed.Learn how the commands are represented in the help (e.g.
CTRL-Oin normal mode,i_CTRL-X_CTRL-Nfor insert mode), think of a good mapping candidate, then try to look it up via:help CTRL-...) If there are no matches, you can make sure that the mapping is free via:nmap C-...; if there is a match (the nice thing is that this also covers plugins that supply documentation), you can read the description, have at least discovered a new Vim command, and can then decide whether you need it (then retry with a different mapping candidate), or whether you override the command.(Note that you can also
:noremapbuilt-in commands to other keys, but be aware that this makes you increasingly helpless in vanilla Vim installations or other application’s vi-emulation modes.)