semicolon to repeat "f" delay

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

semicolon to repeat "f" delay

surge
Hi,

What has always puzzled me is that the ";" command to repeat the last "f" or "F" command always takes too long. There's a noticable delay which I think happens because vim waits if something is about to follow the ";". As a result I prefer to use "f" one more time instead.

Why the delay and what to do about it?

Thanks

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: semicolon to repeat "f" delay

Erik Falor
On Mon, Jan 19, 2015 at 08:22:05PM -0800, surge wrote:
> Hi,
>
> What has always puzzled me is that the ";" command to repeat the last "f" or "F" command always takes too long. There's a noticable delay which I think happens because vim waits if something is about to follow the ";". As a result I prefer to use "f" one more time instead.
>
> Why the delay and what to do about it?

You probably have one or more mappings which begin with ";".  The
delay happens because Vim needs to see if you are going to type
another character, which will determine whether you want to execute
the mapping or use the default behavior of ";".

Try

    :verbose map ;

to find out which mappings begin with ";" and whence they come.

The duration of the delay is also configurable.  See

    :help timeoutlen

for more information about that.

--
Erik Falor
Registered Linux User #445632                  http://linuxcounter.net

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

attachment0 (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: semicolon to repeat "f" delay

Tim Chase
In reply to this post by surge
On 2015-01-19 20:22, surge wrote:
> What has always puzzled me is that the ";" command to repeat the
> last "f" or "F" command always takes too long. There's a noticable
> delay which I think happens because vim waits if something is about
> to follow the ";". As a result I prefer to use "f" one more time
> instead.
>
> Why the delay and what to do about it?

This sounds suspiciously like you have some mapping set to start with
";" or you've mapped the "leader" to ";", so Vim is waiting to see if
you're going to type another character to complete the mapping.

The better solution is to track down which of those cases is causing
the problem and shift the mapping/leader to a different character.

However, if you're hard-wired to use the ";" as a mapping/leader,
then you can adjust your timeout/ttimeout/timeoutlen/ttimeoutlen
settings.

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: semicolon to repeat "f" delay

surge
In reply to this post by Erik Falor
You rock, Erik! That's exactly the answer I was looking for.

On Mon, Jan 19, 2015 at 10:56 PM, Erik Falor <[hidden email]> wrote:
On Mon, Jan 19, 2015 at 08:22:05PM -0800, surge wrote:
> Hi,
>
> What has always puzzled me is that the ";" command to repeat the last "f" or "F" command always takes too long. There's a noticable delay which I think happens because vim waits if something is about to follow the ";". As a result I prefer to use "f" one more time instead.
>
> Why the delay and what to do about it?

You probably have one or more mappings which begin with ";".  The
delay happens because Vim needs to see if you are going to type
another character, which will determine whether you want to execute
the mapping or use the default behavior of ";".

Try

    :verbose map ;

to find out which mappings begin with ";" and whence they come.

The duration of the delay is also configurable.  See

    :help timeoutlen

for more information about that.

--
Erik Falor
Registered Linux User #445632                  http://linuxcounter.net

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: semicolon to repeat "f" delay

surge
In reply to this post by Erik Falor
Oh yeah, quite a few mappings starting from ; Problem solved. Thanks, guys!

On Mon, Jan 19, 2015 at 10:56 PM, Erik Falor <[hidden email]> wrote:
On Mon, Jan 19, 2015 at 08:22:05PM -0800, surge wrote:
> Hi,
>
> What has always puzzled me is that the ";" command to repeat the last "f" or "F" command always takes too long. There's a noticable delay which I think happens because vim waits if something is about to follow the ";". As a result I prefer to use "f" one more time instead.
>
> Why the delay and what to do about it?

You probably have one or more mappings which begin with ";".  The
delay happens because Vim needs to see if you are going to type
another character, which will determine whether you want to execute
the mapping or use the default behavior of ";".

Try

    :verbose map ;

to find out which mappings begin with ";" and whence they come.

The duration of the delay is also configurable.  See

    :help timeoutlen

for more information about that.

--
Erik Falor
Registered Linux User #445632                  http://linuxcounter.net

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: semicolon to repeat "f" delay

Salman Halim


On Jan 20, 2015 1:23 AM, "Sergei Gerasenko" <[hidden email]> wrote:
>
> Oh yeah, quite a few mappings starting from ; Problem solved. Thanks, guys!
>
> On Mon, Jan 19, 2015 at 10:56 PM, Erik Falor <[hidden email]> wrote:
>>
>> On Mon, Jan 19, 2015 at 08:22:05PM -0800, surge wrote:
>> > Hi,
>> >
>> > What has always puzzled me is that the ";" command to repeat the last "f" or "F" command always takes too long. There's a noticable delay which I think happens because vim waits if something is about to follow the ";". As a result I prefer to use "f" one more time instead.
>> >
>> > Why the delay and what to do about it?
>>
>> You probably have one or more mappings which begin with ";".  The
>> delay happens because Vim needs to see if you are going to type
>> another character, which will determine whether you want to execute
>> the mapping or use the default behavior of ";".
>>
>> Try
>>
>>     :verbose map ;
>>
>> to find out which mappings begin with ";" and whence they come.
>>
>> The duration of the delay is also configurable.  See
>>
>>     :help timeoutlen
>>
>> for more information about that.
>>
>> --
>> Erik Falor
>> Registered Linux User #445632                  http://linuxcounter.net

I solved this problem by mapping ;; to ; as in:

noremap ;; ;

Now, I just hit it twice. Doesn't take much longer to do and is faster than waiting for the timeout.

Salman

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.