You are not logged in.
Pages: 1
Hi there,
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.
Offline
There is a database of vim scripts on vim.org and a lot of them are on Github.
Offline
There is a database of vim scripts on vim.org and a lot of them are on Github.
I konw there it is, but I couldn't find exact one. I wonder if experienced people know that.
Offline
Not a Programming issue, moving to NC...
Offline
The latex-suit documentation gives some information that should help you start your search: http://vim-latex.sourceforge.net/docume … ce-holders
Offline
You may also have a look at the VPars Vim script. Not exactly what you want but probably near enough.
To know or not to know ...
... the questions remain forever.
Offline
Thanks all replay above.
I have found a trick make it.
" 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
Offline
Pages: 1