I've been googling around trying to figure out if it's possible to use my mouse wheel to scroll while inside Vim in Mac's Terminal, with no luck. It seems as if only X11 or iTerm support this.
Before I give up, I thought I'd try the geniuses here to see if anyone knows a way to do this. So, does anyone know if I can set that up?
Or should I seriously consider using a different terminal application?
Try doing :set mouse=a and then the scroll wheel ought to move you around vim. If you'd prefer the scroll wheel to send arrow keys without using mouse reporting, turn on "Prefs>Advanced>Scroll wheel sends arrow keys in alternate screen mode" and turn off "Prefs>Profiles>Terminal>Disable save/restore alternate screen".
If you press Ctrl + w , followed by Shift + n , it pauses the terminal, and you can navigate it like any buffer. Pressing i takes you back into the terminal as you were before.
You can scroll the screen while holding fn or Shift ⇧ key. You can disable this completely by unticking: Terminal Preferences → Profiles → Keyboard → Scroll Alternate Screen.
":set mouse=a" is used to enable mouse scrolling/selection.
And if you're using iTerm, add this to your vimrc
:set mouse=a
http://bitheap.org/mouseterm/
Use MouseTerm (and do make sure to install SIMBL first!) and scrolling will work like a charm, even remote, using Mac Terminal.
You need to fully quit the Terminal application (Command+Q) and then launch it again after installing MouseTerm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With