Vim backslash in command

Viewed 2646

I feel like this is a very stupid question, but I can't seem to find the answer to this anywhere. I'm relatively new to vim. After a fresh install I installed the vim-LaTeX plugin, or the LaTeX-suite for vim. It works correctly apart for the fact that there are some commands I don't understand. It gives the following instruction:

To do this, visually select a portion of the text and press \ll while in visual mode. The visually selected portion will be saved to a temporary file with the preamble from the current document prepended. Latex-Suite will then switch focus to this temporary file and compile it

But if I press '\' it does nothing and double l moves the cursor to the right. I don't understand what I'm supposed to be doing, and I feel incredibly stupid. Sorry if off-topic.

2 Answers

The \ is the default value for the :help <Leader> key. Plugins are encouraged to start all default mappings with <Leader>. If you've redefined it, you need to use that key instead.

Otherwise, you need to press V \ L L (without Shift) in quick succession (by default within one second).

If you want to find out whether the plugin has been successfully installed and there's actually an action behind those keys, you can use either:

:verbose vmap <Leader>ll
:verbose vmap \ll

If Vim says No mapping found, or just lists other mappings starting with some of the keys, the plugin isn't installed properly, or you're not using it right.

Press v to go into visual mode. Then you can use your arrow keys to select text. After you've selected the text you want, type \ll.

That should be it.

Related