From the course: Learning vi
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Scrolling the text
vi was originally written on hardware terminals before the concept of a scroll bar existed. But I'm going to use the term scrolling to describe these commands, all of which use the Ctrl key. You can use Ctrl+e and Ctrl+y to scroll the screen up and down by one line. e is short for expose, because you're exposing an additional line at the bottom of the screen. y, I have no idea why it's called that. You can use Ctrl+d and u to scroll down or up by half a screen full. And you can use Ctrl+f and Ctrl+b to scroll forward and back by a full screen full. Let me demonstrate those. So let's go to our Purloined Letter file. So here, I can do Ctrl+e to expose another line. e e e, that's Ctrl+e, Ctrl+e, Ctrl+e. Or I can do Ctrl+y, Ctrl+y, Ctrl+y to scroll by a single line in the other direction. When you use these Ctrl keys, the cursor remains exactly where it is. w w w. So I can do Ctrl+y, Ctrl+y, Ctrl+y, Ctrl+e, Ctrl+e, Ctrl+e, and the cursor remains where it is in the text. However, if the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.