How to read Vim keystroke syntax?

11

2

I'm trying to learn Vim and I'm seeing a lot of documentation use syntax like <C-v>. Is there a general guide on how to read this correctly?

I've attached an example SO post below that uses this syntax:

Vim multiline editing like in sublimetext?

Do yourself a favor by droping the Windows compatibility layer. The normal shortcut for entering Visual-Block mode is <C-v>.

canyon289

Posted 2015-08-13T14:12:02.823

Reputation: 215

2Are you asking about how you would read the directions out loud in English, or about what key(s) it is instructing you to press? – cjm – 2015-08-13T21:21:28.413

Shameless plug: If you're interested in Vim, checkout the [vi.se] sister site. – muru – 2015-08-14T06:24:11.713

Answers

17

From within Vim, :help <> has a short overview of the notation Vim uses with a few examples, including:

<C-G>            CTRL-G
<C-LeftMouse>    Control- left mouse click

:help key-notation or :help keycodes will bring up a more thorough list of conventions used within Vim's documentation (and typically copied by Vim users as well) to refer to various keys. One of the lines has this:

notation    meaning       equivalent   decimal   value(s)
-----------------------------------------------------------------------

<C-...>     control-key                          *control* *ctrl* *<C-*

8bittree

Posted 2015-08-13T14:12:02.823

Reputation: 2 595

2

I am not sure if there is a general guide on vims documentation syntax. But from my experience < C-v> is equivalent to (ctrl + v).

This can be seen for example in this cheat sheet. https://gist.github.com/awidegreen/3854277

And in this question on SO https://stackoverflow.com/questions/289681/why-does-c-a-ctrla-not-work-under-gvim-on-windows

Lindefelt

Posted 2015-08-13T14:12:02.823

Reputation: 31