Loading ...
Sorry, an error occurred while loading the content.

91153Re: (bug) delay of 1 second after a few commands before screen gets updated

Expand Messages
  • Tony Mechelynck
    Jun 2, 2008
    • 0 Attachment
      On 02/06/08 23:51, Dominique Pelle wrote:
      > Hi
      > I've noticed that a couple of Vim commands have a lag (1 or 2 seconds?)
      > before the screen gets updated. Here is a simple example:
      > 1/ start vim in a terminal (not gvim)
      > 1/ type a line of 50 i with:<esc>50ii<esc>
      > 2/ notice when pressing the last<esc>, there is a delay
      > of 1 to 2 seconds before the characters appear on the screen.
      > Other observations
      > - bug happens with Vim in a terminal (at least xterm and gnome-terminal)
      > - bug does not happen with gvim.
      > - bug does not happens with: 'vim -u NONE'
      > - bug happens with 'vim --noplugin' and an empty ~/.vimrc
      > but no longer happens when I delete the empty ~/.vimrc (which is
      > very odd, what's the difference with an empty ~/.vimrc and no ~/.vimrc?)
      > Can anybody else reproduce this bug too?
      > I'm using Vim-7.1.305 (huge) on Linux x86.
      > There are other commands which show the same delay of 1 or 2 seconds
      > such as:
      > - when changing till end of line with: c$foo<esc>
      > - or when inserting something before visual blockwise:<ctrl-v>jjjIfoo<esc>
      > -- Dominique

      VIM - Vi IMproved 7.1 (2007 May 12, compiled May 29 2008 23:03:50)
      Included patches: 1-305
      Modified by Bram Moolenaar (floating point)
      Compiled by antoine.mechelynck@...
      Huge version with GTK2-GNOME GUI. Features included (+) or not (-):

      I can reproduce it in konsole, but only in 'nocompatible' mode -- notice
      that an empty vimrc still sets that:

      vim --noplugin -u /dev/null

      inserts the 50 i immediately ('compatible' is on when using the -u
      command-line argument), but if I retry after ":set nocp" in the same
      session there is a wait of about 1 second, or maybe slightly less,
      before they appear.



      I don't see any wait: Insert mode is entered when I hit the dollar sign,
      "foo" is entered as I type it, <esc> goes back to Normal mode.

      With <block visual>Ifoo<esc> I do see it (I tried it with a somewhat
      larger block, not just 3 lines by 1 column).

      IIUC Vim is waiting for possible multibyte keycodes starting with Esc,
      its delay is 1 second for both mappings and keycodes, as can be seen by:

      :set timeout? ttimeout? timeoutlen? ttimeoutlen?

      Setting 'ttimeoutlen' to 100 (1/10 s rather than 1s) makes the "strange"
      behaviour disappear, because then Vim waits only 0.1s for keycodes, a
      time too short to be noticed.

      Best regards,
      By doing just a little every day, you can gradually let the task
      completely overwhelm you.

      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 5 messages in this topic