Question

I use the Voom outliner plugin in vim and mapped a command to :

:map <M-o> :VoomToggle markdown

The mapping works but when I use it, it just puts the command into the command line of vim. I still have to hit return for execution. How can the command applied automatically without hitting return?

Était-ce utile?

La solution

You need to include the concluding Enter in the mapping, just as you'd type it.

:map <M-o> :VoomToggle markdown<CR>

Vim uses a special notation, like in the mapping keys; see :help key-notation.

Also, you should use :noremap; it makes the mapping immune to remapping and recursion.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top