I see a lot of talk about different keys (<C-R>
, <C-j>
, and <C-w>
) in Vim and I'm wondering if there's a list somewhere (:help
?) that tells what they are. I figured out <C-R>
is Enter ("carriage return", I suppose) but often the others don't make immediate sense.
Silent. Adding <silent> prevents stdout in Vim when a command runs. Sometimes when you execute a command call in Vim, it gets echoed.
Key mapping refers to creating a shortcut for repeating a sequence of keys or commands. You can map keys to execute frequently used key sequences or to invoke an Ex command or to invoke a Vim function or to invoke external commands. Using key maps you can define your own Vim commands.
In vim, control-left and control-right are back and forward whitespace-separated word (i.e. synonyms for B and W), the same as web textareas and bash . But when running screen , these keys stop working. When pressed, vim instead switches to its command line and enters 5C or 5D there.
So many key-bindings to learn in vim
, you'd better learn how to use the :help
.
There are some tips to get help quickly:
Ctrl-W
in normal mode:
:h ^w
Ctrl-W
in insert mode:
:h i^w
Ctrl-W
in visual mode:
:h v^w
Ctrl-W
in command mode:
:h c^w
Open help in another tabpage:
:tab h ^w
These are not keys, they are keys associated with the control key. <C-j>
means "Press j while pressing control".
<C-R>
is not carriage return, it's the redo command. <CR>
is carriage return. <C-F>
is page up, <C-B>
is page down, ...
The control keys. For instance, using <C-w> h
(or j
, k
, l
) will toggle between open buffers.
<C-j>
will move you down a line. Also, I could be wrong, but I believe the carriage return is <CR>
(not <C-R>
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With