質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top