2

Is it possible to increase cursor move speed when holding down (h/j/k/l) ? If so, how?

3
  • unless you're using gvim or other gui, this has more to do with your terminal than vim
    – Mass
    Apr 9, 2021 at 23:45
  • I've deleted a few comments (including my own) that weren't really using comments as intended—comments are for clarification and improvement. Discussions on better ways to move can happen in Vi and Vim Chat if folks want. Frame-challenge answers are also welcome, but should be polite.
    – D. Ben Knoble
    Apr 10, 2021 at 15:59

3 Answers 3

3

It is impossible to do from within vim or gvim. That is what operating system does for all keypresses (I doubt you can separately increase it only for specific keypresses)

For windows it is: enter image description here

For OSX or linux there should be similar settings.

I would suggest to use more navigation facilities vim has:

  1. /funcname<CR>nnn search if you know specific function
  2. } goto next paragraph
  3. C-f scroll page down
  4. C-d scroll half a page down
  5. tag *func*name<tab> if you have tags
  6. H, M, L to go to top, middle and bottom of the screen
  7. plugin easymotion
  8. ... many more
2

As a bit of a frame-challenge, consider learning some more :help motion (the full list is long; take it slow!).

Some particular useful ones:

  • search / and ?, along with shortcuts */gd/etc.
  • scrolling Ctrl and any of d/u/b/f
  • moving in a line f/F/t/T
  • various text-object motions )/}/etc.
  • marks/tags/etc.

As a bonus, these motions combine orthogonally with operators, so you get a 2-for-1: faster movement and faster editing when you need it.

1

If cursor movement one-place-at-a-time takes too long, then perhaps it's worth learning some other options.

Firstly, try prefacing with a number, to move that many places; eg. 24h will move 24 places to the left.

Secondly, how about moving by words (b/w)?

Thirdly, how about jumping directly to a specific column? e.g. 17| will move to column 17 (which because numbering starts at 1, is 16 places away from the left edge, and matches the 2nd tab-stop if you have :set ts=8).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.