Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrolling inside Vim in Mac's Terminal

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?

like image 698
hora Avatar asked Nov 13 '09 05:11

hora


People also ask

How do I scroll in vim Mac?

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".

How do I scroll up in vim terminal?

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.

How do I enable scrolling on Mac terminal?

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.

How do I enable scrolling in Vim?

":set mouse=a" is used to enable mouse scrolling/selection.


2 Answers

And if you're using iTerm, add this to your vimrc

:set mouse=a 
like image 104
Shane Reustle Avatar answered Sep 21 '22 15:09

Shane Reustle


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.

like image 44
Jonatan Littke Avatar answered Sep 24 '22 15:09

Jonatan Littke