0

I am looking for a vim plugin which can provide the following functions:

  1. automatically let the cursor jump one character ahead and insert a tag(<++>) at the original place if the user input a pair of brackets with nothing between them.

  2. when user press ctrl+j, the cursor jumps to the next <++> and remove the tag, as well as push user into insert mode.

I have seen these kind of features in vim-latexsuit. But, I cannot use it while I am not writing tex files.

So, if it possible to find some vim plugins which can provide these functions?

I will appreciate it if anyone can give me some advice.

1 Answer 1

1
" A syntax for placeholders
" Pressing Control-j jumps to the next match.
inoremap <c-j> <Esc>/<++><CR><Esc>cf>
" Completions using placeholders
inoremap ) )<++><Esc>F)i
inoremap ] ]<++><Esc>F]i
inoremap } }<++><Esc>F}i

Add those it your .vimrc It should work

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .