Reputation: 8820
I have many latin words in my TeX document and wan't them to wrap with a special command \lat{anterior}
. So when I move my cursor in VIM above words, is there an efficent way to add a prefix \lat{
and suffix }
to the current word? Ideally with a key binding?
Upvotes: 0
Views: 463
Reputation: 172580
Have a look at the tpope/vim-surround plugin. You can customize it per filetype; see :help surround-customizing
:
autocmd FileType tex let b:surround_45 = "\\lat{\r}"
Upvotes: 2