I have a trackball, which I don't use much when in vim. I would really like to be able to use it to scroll up and down. Is there a way to set mouse move up/down to scroll up/down?
Asked
Active
Viewed 317 times
1 Answers
2
Many people like Vim because its different modes allow for quick navigation, not just with the obvious j and k, but the whole plethora of available (and powerful!) motions. So, I wouldn't recommend to go down that route; the switch from keyboard to mouse / trackball costs time.
Vim can use a mouse wheel to scroll, cp. :help scroll-mouse-wheel. The mouse can be used for locating the cursor, but not for moves. Unless you're solely using fullscreen mode for your applications, how would you "uncapture" the mouse from the Vim window, anyway? As you can see, this is complex, would require third-party tools (e.g. to map the mouse movements into scrollwheel events), and is generally undesirable.
Ingo Karkat
- 22,638
- 2
- 45
- 58
-
Its a matter of ergonomics actually. I'm developing a repetitive strain injury. I just
hjkl all the time, but its getting to the point where even that is too much :( – Erotemic Jun 09 '14 at 20:00 -
Do you already use an ergonomic keyboard? A good one really makes a difference. And there may indeed be software that turns a pointing device to a general-purpose scroller (on the OS level, so that it works with any application). – Ingo Karkat Jun 09 '14 at 20:03
-
I do have a microsoft ergonomic keyboard and mouse (thought I do prefer my mechanical das keyboard). I was afraid of the OS solution because I work on Windows 7 and Ubuntu 12.04. I've already found a script for windows Autohotkey (http://superuser.com/questions/402240/use-trackball-to-scroll-zoom-etc) but I've yet to find a script for Ubuntu (my main os). – Erotemic Jun 09 '14 at 20:40