35

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)

Reman
  • 7,931
  • 11
  • 55
  • 97

5 Answers5

58

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).

Eric Andrew Lewis
  • 1,256
  • 2
  • 13
  • 22
MBO
  • 30,379
  • 5
  • 50
  • 52
  • Thank you. Yes, I know the command :map and :verbose map. :h map-listing I've never seen. – Reman Mar 24 '11 at 07:33
  • Just a note, I had `vim.o.more = false` in my `init.lua` (neovim). This meant that the log output of `:map` was not scrollable using conventional means. I commented out that setting and it fixed it. (`let &more = v:false` should be the vimL equiv) – Lazerbeak12345 Mar 12 '23 at 05:07
18

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

:help index
skeept
  • 12,077
  • 7
  • 41
  • 52
  • nice, thank you. BTW.. I regret to see that there is no way to see only the NOT-taken ctrl-shift-alt shortcuts. – Reman Mar 24 '11 at 07:34
8
:map //lists all the shortcuts that are assigned.

map also takes a key combination as an argument that lists only the shortcuts assigned to this key combination.

To list all the mappings assigned for Ctrl-V:

:map <c-v>
Naga Kiran
  • 8,585
  • 5
  • 43
  • 53
2

I found this helpful...

http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html

elimirks
  • 1,452
  • 2
  • 17
  • 30
1

If you want a sorted, searchable list of your current mappings to look for unused keys, see my answer at: How to search in the Vim mapping listing?

As a starting point, for the keys are not mapped by default, see :help map-which-keys

You can use :map < key > to check a specific mapping. Example: to check Shift-F2, :map S-<F2>.

AFAIK, there's no way of getting a list of what's unmapped without writing code to iterate through each possible key combination and check if there is any output from running :map < key > for that particular key.

Community
  • 1
  • 1
Tom Hale
  • 40,825
  • 36
  • 187
  • 242