Re: [Vim-latex-cvs] vimfiles/plugin imaps.vim,1.9.2.4,1.9.2.5
Brought to you by:
srinathava,
tmaas
|
From: Benji F. <be...@me...> - 2002-12-21 14:58:53
|
Srinath Avadhanula wrote:
On Fri, 20 Dec 2002, Benji Fisher wrote:
:call IMAP("foo", "bar <++> <<cursor>> <++> <<next>>", "", "<<", ">>")
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 <++>?
We cannot enforce cooperation between the person who writes the
call to IMAP() and the person who inserts the text. If we can get the
intended text inserted when the user types "foo", I think it is worth a
little extra effort.
Ofcourse, if the user does something like:
let g:Imap_PlaceHolderStart = '<<'
let g:Imap_PlaceHolderEnd = '>>'
call IMAP('foo', 'bar <++> <<cursor>> <++> next', '', '<<', '>>')
[snip]
Remember: a script writer may make the call to IMAP() (and
another script writer may use different place holders) and we want to
allow the user to pick his or her own values independent of this.
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...
We already agreed that this can be fixed by replacing the place
holders in pairs instead of one substitute for phs and another for phe.
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...
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.
Thanks.
If you want to use
let marker = '<!--- @#% Start Here @#% ----!>'
I guess it is OK. I see you used different numbers of - characters,
which helps. It is long enough that it might trigger an unwanted line
break, but maybe we should wait until that problem actually shows up. If
we want to revert to my idea, "<+<++>+>" style, then we would have to
require that the two place holders be different (which seems reasonable
to me).
--Benji
|