Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out in Vim which command is triggered by some shortcut

I try to execute a command in some plugin by pushing it's keyboard shortcut F2. But some other command is executed, instead. But that command gives an error. So it is not clear where the key mapping of that interfering command is defined. I want to change the mapping of that shortcut. To do this I need to find out what that interfering command is.

Is there a way to find out which command is triggered by some keyboard shortcut?

like image 462
Mert Nuhoglu Avatar asked Nov 18 '10 18:11

Mert Nuhoglu


People also ask

What does Ctrl L do in vim?

In normal mode Ctrl-H is same as h -- that is 'move to the left' while Ctrl-L means 'clear and redraw the screen', not 'move to the right'. This Ctrl-L behavior is very similar to bash shell. This is useful for example when you have background process printing some stuff while you are using vim in terminal.

What is Ctrl W in vim?

CTRL+w CTRL+w - switch between windows CTRL+w UP - Move to the top window from current window CTRL+w DOWN - Move to the bottom window from current window CTRL+w LEFT - Move to the left window from current window CTRL+w RIGHT - Move to the right window from current window.

What does Ctrl F do in vim?

Ctrl+f will search within the file ctrl+shift+f will search in all the files in the folder tree. I added ripgrep , It search :Rg! ,it always search in all files like Ctrl + shift + f Whether Rg can be used to search with the files? (like ctrl + f ).


1 Answers

verbose map <F2>

will give you information about both {rhs} and place where this mapping was defined. For insert mode mappings replace map with imap, same for other mapping modes.

like image 197
ZyX Avatar answered Nov 15 '22 07:11

ZyX