If you regularly use the Terminal in OS X, then you may be happy to know one feature that will likely make it into the final release of OS X Yosemite is the ability to scroll through multiple lines of text in the Terminal.
In OS X Mavericks and earlier, standard output from the Terminal is stored in its scrollback buffer, which allows you to move back and see previous commands and their respective output by using page up and page down, as well as standard scrolling. However, if you open a program such as a text editor that displays content on multiple pages, then this ability to easily scroll will not be available and you will have to use arrows and other keys to view additional content.
For example, if you enter “man top” to open a standard manual page for the “top” command, you will see the first part of the manual page as expected, and then have to view anything else outside of the Terminal’s window by navigating with your keyboard. In Yosemite, Apple has added a feature where by scrolling up and down you will rapidly move your cursor up or down by one line. This will in effect allow you to scroll in text editors like pico, vi, and emacs, but also in many other programs. A couple of programs where this may be useful are the “less” command for limiting standard output to a single page at a time, and the Unix “man” pages (which invoke “less” by default).
With this new scrolling feature, you will be able to move up and down through pages of code, configuration files, instructions, and other content in the Terminal, without having to use key-presses. In essence, if you can move the Terminal’s input cursor up and down in your content with the arrow keys, then you will be able to use this feature to scroll.
Even though this feature allows you to scroll through the lines of a current document, you can still scroll up through the standard scrollback buffer by holding the Shift key while scrolling. For instance, if you have a text document open in pico and can see pico’s tools and menus, standard scrolling will move your cursor up and down in pico, but holding the Shift key will move the pico interface down and reveal the past command history and other standard output shown in the Terminal before you opened the pico program.
For anyone who regularly looks up man page information or who views lengthy configuration and code files in the Terminal, this feature should greatly increase your ability to get your work done, especially since by scrolling on a per-line basis, this will place your cursor wherever you scroll to. You can then use the arrow keys to more finely place the cursor where you want, or hold the Option key to click a specific character to have the Terminal place the cursor right where you clicked.
Figured this feature out by accident and had to google to make sure it wasn’t something that had been there before and I had just missed it. This is a really exciting feature that will be super helpful in managing unix servers.
How is this turned off please?
It’s USELESS under screen – a very common means of administrating remote linux servers — in fact it just crippled a production server as this is when i found out this new feature existed (sigh). It floods screen’s buffer with uneraseble characters.
It’s also useless in situations where I have lots of history and it churns through the history buffer displaying commands instead of rolling back the text I need to refer to.
Nothing appearing in Preferences — help!
Ah – it is there and it is called Scroll Alternate Screen (whew)
Thanks! This helped me out 🙂
How do I turn this frigging feature off!?!?! It is the worst! Instead of being able to scroll backwards through text, it’s scrolling through my command line history. This is the most ill-conceived awful misfeature ever!
Thanks for this page! This “feature” was driving me crazy and I didn’t even know how to look it up.
While using screen or pico, this prevents you from looking back at text in the Terminal window’s scrollback buffer, which I often want to do. It’s good to know that I can override this behavior by pressing shift while using the scroll wheel. I haven’t decided yet whether to turn it off entirely.
For those who want to turn off this feature, there is a checkbox deep in the Terminal preferences:
Terminal menu -> Preferences… -> Profiles tab -> Basic (or whatever profile you use) -> Keyboard tab -> “Scroll alternate screen”.
I guess the “full-screen” command-line apps like screen, pico, man, more and less use something called the “alternate screen”.