How to use the mouse to scroll up/down in MacOS Yosemite Terminal when vi is open
Solution 1
The behavior is configurable in Terminal.app, but the default binding for scrolling has changed so that the shift modifier is no longer need. (You can change it back, in Terminal's Preferences). Here are some links discussing the changes
- How to turn off mouse (or touchpad) scrolling when running vim in an xterm?
- Easy Mac Hacks: What's New in Terminal in Yosemite
- Yosemite introduces per-line scrolling in the Terminal
There are other changes (to home and end) introduced in Yosemite, which are reflected in ncurses' terminal entry for nsterm
, which is the recommended setting for TERM
:
Solution 2
In Terminal select Terminal -> Preferences -> Profiles -> Keyboard -> Scroll Alternate screen (unchecked) to reset the behavior
Solution 3
In Yosemite vs. previous OSX versions, the scrolling is now done by holding down the shift key while scrolling up\down.
Scrolling up\down without holding the shift key, will scroll through VI's lines.
Related videos on Youtube
RaamEE
Updated on September 18, 2022Comments
-
RaamEE almost 2 years
In MacOS X, pre-Yosemite versions I could open
vi
in the Terminal window and scroll up and down the history of the Terminal. Thevi
lines in this case did not scroll.To scroll I used the mouse-pad's two fingers up/down method.
In Yosemite this doesn't work. When I try to scroll up/down, the cursor in
vi
moves while the lines ofvi
scroll up/down.How can I scroll up the window?