1

Whenever I move the cursor after the last/before the first character of the line, or I move before the first/after the last line in Vim there is a latency until I can control the cursor again.

It happens in bash too, but not in emacs.

It happens within konsole/terminator terminals but there is no problem while in a TTY out of X (only a colored refresh of the screen happens but I don't lose cursor's control).

Any hints ?

2
  • Just for clarification, you aren't using screen here for a serial terminal, right?
    – phk
    Feb 3, 2017 at 18:04
  • Right, I use it locally only
    – vxdcxw
    Feb 3, 2017 at 18:06

1 Answer 1

2

The likely problem is when using key-repeat to move continuously in in a terminal, when you reach the end, your key will have sent more characters than were needed to reach the end. The editor (or other application) still has to read and react to those extra characters. While it is doing that, you may notice that nothing seems to be happening.

Cursor keys send move than one character, usually 3, so key-repeat can fill up the program's input buffer more rapidly than you might expect.

Rather than using key-repeat to move around, vi was designed for slow terminals, providing single-character movement to useful points on the screen, e.g., ^ to move to the beginning of a line, H to move to the top of the screen, G to move to the end of the file.

1
  • Ok, I tried to downscale the keyboard repeat value and it seems ok with a value of 12 repeat/s but I work with a value of 50 r/s. It seems I'll have to change my habits and use line/words movement as you suggested. Thank you.
    – vxdcxw
    Feb 4, 2017 at 13:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .