Frage

I am using the following plugin to simplify tagging URLs in Markdown: tpope/vim-surround

This works:

nmap <leader>l <Plug>Ysurroundiw]%a(<C-R>*)<Esc>

This doesn't (notice the capital 'S'):

vmap <leader>l <Plug>YSurround]%a(<C-R>*)<Esc>

Any idea why?

War es hilfreich?

Lösung

Try using VSurround instead of YSurround since you're using a vmap.

Andere Tipps

Surround is awesome but what about a more portable, plugin-agnostic, solution?

xnoremap <leader>l <Esc>`>a](<C-r>*)<C-o>`<[<Esc>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top