I've been experiencing a strange behaviour when typing several keys
*quickly*. The email address I use for mailing lists is the one I use
here. From time to time, I have to type it in a message. And lastly,
when I type it *quickly*, the screen just erases itself, leaving a blank
screen and I loose total control over it. The only solution is to
manually close is. The strange thing is that if I type slowly, this
behaviour doesn't happen. So to sum up: typing
dlist@
triggers the strange behaviour (it's at the @ caracter).
I've noticed that the cursor stays say a second on the last caracter
typed then move one space to the right, but not with all caracters.
Example are 's', 'd'. Other caracters don't show this.
I don't know how to troubleshoot this.
Any help would be greatly appreciated.
Have nice day,
Steve
"Waiting one second" is a typical behaviour when Vim is waiting to see
whether you'll type the {lhs} of a multi-character mapping.
- Do you sometimes forget to set Insert mode before typing this address?
- If the "one second wait" happens, let's say, at the letter s (but not
at the i preceding it), try
:verbose map s
:verbose map! s
(the former will give you mappings for Normal, Visual, Select and
Operator-Pending modes, the latter for Insert/Replace and Command-line
modes, so use both). Similarly for d etc.
Best regards,
Tony.
--
Oh, I don't blame Congress. If I had $600 billion at my disposal, I'd
be irresponsible, too.
-- Lichty & Wagner
Thanks for your answer.
> >I've been experiencing a strange behaviour when typing several keys
> >*quickly*. The email address I use for mailing lists is the one I use
> >here. From time to time, I have to type it in a message. And lastly,
> >when I type it *quickly*, the screen just erases itself, leaving a blank
> >screen and I loose total control over it. The only solution is to
> >manually close is. The strange thing is that if I type slowly, this
> >behaviour doesn't happen. So to sum up: typing
> >
> >dlist@
> >
> >triggers the strange behaviour (it's at the @ caracter).
> >
> >
> >I've noticed that the cursor stays say a second on the last caracter
> >typed then move one space to the right, but not with all caracters.
> >Example are 's', 'd'. Other caracters don't show this.
> >
> >I don't know how to troubleshoot this.
> >
> >Any help would be greatly appreciated.
> >
> >Have nice day,
> >Steve
> >
> >
>
> "Waiting one second" is a typical behaviour when Vim is waiting to
> see whether you'll type the {lhs} of a multi-character mapping.
>
> - Do you sometimes forget to set Insert mode before typing this address?
No, this happens only in Insert mode.
> - If the "one second wait" happens, let's say, at the letter s (but
> not at the i preceding it), try
I changed s for d.
> :verbose map d
Nothing
> :verbose map! d
It shows my mapping which is
! dlist <dl...@bluewin.ch>
which I put in ~/.vim/mappings
If I comment out this line, the problem dissapears. The strange thing is
that I have other mappings for email addresses, but no problem with
those.
Strange isn't it?
Thanks for your help,
steve
Well, I guess with a different {lhs}, for instance
:inoremap !d dl...@bluewin.ch
it will probably work.
Or else, maybe it's just a missing refresh: try (in Insert mode) Esc
Ctrl-L a if the screen gets blank again.
Best regards,
Tony.
--
*** NEWSFLASH ***
Russian tanks steamrolling through New Jersey!!!! Details at eleven!
I guess you've got a recursive mapping there, since the right hand side
includes the left hand side. It only happens when you type fast because
the mapping doesn't timeout.
Try
:noremap! dlist <dl...@bluewin.ch>
instead of just :map! ...
Ben.
Ben, what you're saying ought not to happen: ":help recursive-mapping"
says that if the {rhs} _starts_ with the {lhs} there is no recursion.
Best regards,
Tony.
--
"OK, now let's look at four dimensions on the blackboard."
-- Dr. Joy
That isn't the case here. The LHS starts with 'd', the RHS starts with
'<'.
Ben.
Ah, right.
Best regards,
Tony.
--
Connector Conspiracy, n:
[probably came into prominence with the appearance of the
KL-10, none of whose connectors match anything else] The tendency of
manufacturers (or, by extension, programmers or purveyors of anything)
to come up with new products which don't fit together with the old
stuff, thereby making you buy either all new stuff or expensive
interface devices.
> >> :verbose map! d
> >
> >It shows my mapping which is
> >
> >! dlist <dl...@bluewin.ch>
> >
> >which I put in ~/.vim/mappings
> >
> >If I comment out this line, the problem dissapears. The strange thing is
> >that I have other mappings for email addresses, but no problem with
> >those.
>
> I guess you've got a recursive mapping there, since the right hand side
> includes the left hand side. It only happens when you type fast because
> the mapping doesn't timeout.
Not sure I've understood, but
> Try
>
> :noremap! dlist <dl...@bluewin.ch>
>
> instead of just :map! ...
that works perfectly !
Thanks to all of you.
steve
You mapped dlist to <dl...@bluewin.ch> but the {rhs} is reexamined for
mappings: so
dlist
becomes
<dl...@bluewin.ch>
becomes
<<dl...@bluewin.ch>@bluewin.ch>
becomes
<<<dl...@bluewin.ch>@bluewin.ch>@bluewin.ch>
becomes
<<<<dl...@bluewin.ch>@bluewin.ch>@bluewin.ch>@bluewin.ch>
and so on, until either Vim reaches 'maxmapdepth' repeats (1000 by
default) or its memory is exhausted, whichever happens first.
Using :noremap! or :inoremap instead, the {rhs} is not remapped, and
there is no recursion.
see
:help recursive-mapping
:help 'maxmapdepth'
Best regards,
Tony.
--
Corruption is not the #1 priority of the Police Commissioner. His job
is to enforce the law and fight crime.
-- P.B.A. President E. J. Kiernan
> On 15/04/11 16:14, Steve wrote:
That's very clear an explanation.
Thanks Tony.
Have a nice day,
Steve