31

I know "expose one more line" for Ctrl-E, but why use Ctrl-Y to expose one more line at the top? Is there an easy mnemonic for this that I'm missing?

1
  • 4
    It goes y'up the file.
    – Rich
    Nov 16, 2017 at 11:29

2 Answers 2

39

Bill Joy and Mark Horton wrote in their original vi manual:

If you want to see more of the file below where you are, you can hit ^E to expose one more line at the bottom of the screen, leaving the cursor where it is. The command ^Y (which is hopelessly non-mnemonic, but next to ^U on the keyboard) exposes one more line at the top of the screen.

So, "next to u" was the motivation, and can serve as a mnemonic, I guess.

The Y also sort of represents an arrow pointing up (↑) if you squint a little bit (it has the head of the arrow inverted).

2
  • 8
    if you squint a little bit ;-)
    – romainl
    Oct 20, 2015 at 10:24
  • 2
    I see control e and control y as both being "sort of to the left of the control d and control u keys they're related to".
    – user859
    Oct 20, 2015 at 16:18
22

I like to call <C-y> "Yester-line"™ like "Yesterday". Explaining it along with <C-e> rhymes, too. "Extra-line" and "Yester-line"™.

3
  • 5
    This is brilliant and you deserve some sort of award.
    – mtraceur
    Jun 29, 2019 at 21:20
  • Well at least he got reputation points. I christen it "The 21 points in VI stackexchange" award Jul 17, 2023 at 19:26
  • Like Vim golf, every point makes a difference.
    – ddrscott
    Sep 15, 2023 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.