Hardik Joshi
Hardik Joshi

Reputation: 849

Meaning of Vim Mapping <A-x-Left><CR>

I have seen this mapping in one vimrc file

  map <A-x-Left> :bprevious<CR>

But I don't understand how to use it.

Upvotes: 1

Views: 188

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172758

Me neither. Vim doesn't support key chording, only simple combinations of Ctrl or Alt with another (possibly Shift-ed) key. :help key-notation is the corresponding reference.

What was probably meant is this:

map <A-x><Left> :bprevious<CR>

Which can be triggered by first pressing Alt + X together, followed by .

And this should use :noremap; it makes the mapping immune to remapping and recursion.

Upvotes: 4

Jean-Karim Bockstael
Jean-Karim Bockstael

Reputation: 1405

<A- is the Alt key, so <A-x-Left> means Alt + x + left arrow. You can read more on key notation in vim's help: :help key-notation.

Upvotes: 1

Related Questions