Monday, December 21, 2009

imaps.com and brackets completion

Hi there,
In my ~/.vimrc I have:

imap ( ()<Left>
imap [ []<Left>
imap { {}<Left>

which is quite convenient.


I use LaTeX Suite and when loading a .tex file those definitions vanish
due to ~/plugin/imaps.vim which is part of LaTeX Suite.

In this case I would like to reestablish the above definitions. The
only way I found is this

autocmd BufWinEnter *.tex call IMAP("(","(<++>)",'')
autocmd BufWinEnter *.tex call IMAP("[","[<++>]",'')
autocmd BufWinEnter *.tex call IMAP("{","{<++>}",'')

It works but of course it is not exactly elegant.


Is there a way to invoke "call IMAP" only one time for each bracket? I
don't want to edit imaps.vim but would like to to this in ~/.vimrc if
possible.


--
Thanks,
Manfred

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: