Re: [Vim-latex-devel] Re: Alt mappings
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2003-01-07 23:40:58
|
On Tue, 7 Jan 2003, Benji Fisher wrote: > Mikolaj Machowski wrote: > > create his own mappings by doing :map ]em FEM (in another words: create > > latexSuite API). But I do not know how to do this. > Well, Mikolaj's idea works OOTB for me... for example, if I do: imap ]em FEM Then when I press ]em, I do use latex-suite's FEM macro. Unfortunately, doing call IMAP(']em', 'FEM', 'tex') doesn't work (I just get 'FEM')... > This is what <Plug> is for. We already use this in imaps.vim . > Just search for "<Plug>" to see the examples. Well, latex-suite provides <plug>s for things like IMAP_Jumpfunc(), not for things like EFI in insert mode which generates the figure micro template... Doing it the <plug> way for those will be, I think needlessly complex. If we had a way of modifying s:LookupCharacter() in imaps.vim so that its public, then we could have done something like: call IMAP(']em', "\<C-r>=IMAP_LookupMap('FEM')\<CR>", 'tex') (Ofcourse, this is not the way IMAP_LookupMap works right now...) and then ]em will expand to what FEM did previously... Maybe we can even provide a function, IMAP_Remap('FEM', ']em', 'tex') which well, does what Mikolaj wants... For some time, I have been thinking of providing a IMAP_UnMap() function... If we implement that, IMAP_Remap() will be implemented almost the same way... In short, I do not think doing what Mikolaj wants is very complex, and in fact, instead of going about it changing all the places where the maps are created, providing a IMAP_Remap() might be the way to go. Ofcourse, this a new feature, so maybe we should wait for a little while. I am thinking of making another vim.sf.net sometime soon, because we seem to be decently stable and bug-free... Srinath |