Re: [Vim-latex-devel] new version of imaps.vim
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2002-12-17 05:28:47
|
On Mon, 16 Dec 2002, Benji Fisher wrote: > > Hmm... Its kinda sad to have to abandon the better idea because of some > > artificial limitation like this :( Well, the thing above is not so bad I > > suppose. For all practical purposes, it will be as extensible as the new > > idea... > > I am also reluctant to abandon the "new" (old new?) method, having > gone to the trouble of implementing it, but this seems like the right > thing to do. Well, its not a complete loss. All the simplifications in imaps.vim will still be retained... Basically, IMAP() and LookupChar...() have both been reworked compelteley. And it is conceptually simpler, which is a benefit for end users I suppose... > > function! IMAP(lhs, rhs, ft, ...) > > I think that, if left unspecified, the placeholders go through the > same logic as before: [bg]:Imap_PlaceHolderStart and > [bg]:Imap_PlaceHolderEnd, then default to '<+' and '+>'. The optional > arguments should always be supplied, except in two cases: > > (1) a:rhs does not contain any place holders (not even for cursor placement) > > (2) in an ftplugin or similar file, where b:Imap_PlaceHolderStart and > b:Imap_PlaceHolderEnd have been defined. > Hmm... The reason I prefered the other way was that that way, all those places in latex-suite which use IMAP() and Imap_Put...() will not be changed much. More laziness speaking... But I suppose its better to be safe than sorry... Will have to do a search and replace across all files to change Tex_IMAP(lhs, rhs, ft) to IMAP(lhs, rhs, ft, '<+', '+>') and the same for Tex_PutTextWithMovement... But I am wondering if there are places where an IMAP() call is broken across lines using \ or something. > I may have a little time tomorrow to work on this. (Morning: > write solutions to exam. Afternoon: proctor the exam. How do I fit in > some vimming? Bring my laptop and use the school's wireless network! ;) > Then comes the grading ...) Heh :) I was actually looking at the course web-site for what youre teaching. Looks like a fun thing to teach... Srinath -- Srinath Avadhanula Dec 16 9:21pm Steinbach's Guideline for Systems Programming: Never test for an error condition you don't know how to handle. |