Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIM: available shortcuts?

I use many shortcuts for my work in vim. Other shortcuts are taken by plugins.

Sometimes I would like to add a shortcut for a new command but note afterwards that the shortcut was already taken.

Is there a way to see a list of all available shortcuts in VIM? (all ctrl-shift-alt shortcuts)

like image 474
Reman Avatar asked Mar 22 '11 11:03

Reman


People also ask

What does shift 8 do in Vim?

Some other cool Vim search tips/tricks To start off, if you want to search for a word that's there in the file, but you don't want to type it, you can just bring your cursor below it and press * (or shift+8).

What does Ctrl A do in Vim?

In normal mode, typing Ctrl-A will increment the next number, and typing Ctrl-X will decrement the next number. The number can be at the cursor, or to the right of the cursor (on the same line). These are the defaults for Vim, although some scripts remap these keys to perform other functions.

What is Ctrl W in Vim?

Ctrl-w = tells Vim to assign an equal number of lines to each viewport. To move between the viewports while working, use Ctrl-w j to move down, and Ctrl-w k to move up.


2 Answers

Type :help index to see the mappings (shortcuts as you name them) and commands defined by vim itself.

Type :map to see the mappings defined by your vimrc and plugins. Type :verbose map to know where each mapping was defined.

Also :help map-listing to check what's displayed, but you probably already know about it (it's in map.txt help manual).

like image 57
MBO Avatar answered Sep 22 '22 11:09

MBO


If you also want to check which maps or commands are defined by vim itself you can use

:help index 
like image 28
skeept Avatar answered Sep 22 '22 11:09

skeept