Re: [Vim-latex-cvs] vimfiles/plugin imaps.vim,1.9.2.4,1.9.2.5
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2002-12-20 17:59:01
|
On Fri, 20 Dec 2002, Benji Fisher wrote: > > Did your version do something different? I just checked and at least > > for the example you mention it seems to work the same... > > I get > > bar <++> <+cursor+> <++> <+next+> > > with "<+cursor+>" highlighted in Select mode. I think the intention of > the above call to IMAP() is to insert a literal "<++>" into the buffer, > and position the cursor on "<<cursor>>" (modified to "<+cursor+>"). > This is why I broke the string into initial, template, and final. > Okay, I just checked again... With the [bg]:Place* settings left at '<+' and '+>', it does go to <+cursor+> (which is nice :) But I don't quite get how making it jump to <+cursor+> is better. After all, what is the next <C-J> going to do? Take him to <+next+> instead of <++> by somehow magically remembering that it was the <+next+> which the user meant as a placeholder. What about the new <C-K> map? Even if he does land up in <+cursor+> is searching for the previous placeholder supposed to skip the first <++>? Ofcourse, if the user does something like: let g:Imap_PlaceHolderStart = '<<' let g:Imap_PlaceHolderEnd = '>>' call IMAP('foo', 'bar <++> <<cursor>> <++> next', '', '<<', '>>') then your version and the latest version both take the user to <<cursor>> instead of <++> and then we do not have problems anyway because <++> will not be confused for a placeholder... > > Note that we could have > > > > let g:Imap_PlaceHolderStart = '?' let g:Imap_PlaceHolderEnd = '?' > > call IMAP('foo', 'bar ?template? and 2 empty templates: ???? bar', > > '', '?', '?') > > > > Then when we search backward from the end, we will not land at the > > beginning... Ofcourse, this is an improbable scenario, but why take > > the chance? > > I get "?" for the characters you are using, but I assume that your > "2 empty templates" should look something like "<--><-->". (I'll No. There was no utf screw up here... I actually meant single question marks as the arguments to IMAP and using them in the [bg]:Place* settings as well... Using '<-' and '->' will not ofcourse cause problems... This example is ofcourse a little contrived, but so is the one you had with the <<cursor>> ;) Okay just to make things clearer, try the following example on 1.9.2.4 (this is not too contrived). let g:Imap_PlaceHolderStart = '?' let g:Imap_PlaceHolderEnd = '?' call IMAP('foo', 'bar ??something?? something next', '', '?', '?') Here the user would expect to be taken to the first ?? and then to the next ?? For me, this causes a problem with 1.9.2.4. Check it... > I think you are right: the two items above are internal, and we > can decide on what to do after merging the changed into the main branch. Yes. There were a couple of bugs in packages.vim which needed to be fixed. I could then tell Mikolaj the problem... > I am done with grading, so I can do some more coding; but I do not > want to make changes until we agree on what to do. As the CVS docs say, > "log messages are not a substitute for communication." ;) > Hehe :) Sorry about the really long log message of 1.9.2.5 then. I will email those kinds of things to you from next time on... (Should I do an admin -m and change that log message too?) Srinath PS: You can jump back and forth between revisions using cvs update -r 1.9.2.4 imaps.vim cvs update -r b-newimaps imaps.vim When a branch tag is specified, then the tip of the branch is used. |