I recently discovered Ctrl + E and Ctrl + Y shortcuts for Vim that respectively move the screen up and down with a one line step, without moving the cursor . 最近,我發現了Vim的Ctrl + E和Ctrl + Y快捷鍵,它們分別以一個一行的步長上下移動屏幕, 而不移動光標 。 ide
Do you know any command that leaves the cursor where it is but moves the screen so that the line which has the cursor becomes the first line? 您是否知道有任何命令將光標留在原處但移動屏幕,使具備光標的行成爲第一行? (having a command for the last line would be a nice bonus). (在最後一行輸入命令會是一個不錯的選擇)。 this
I can achieve this by manually pressing Ctrl + E (or Ctrl + Y ) the proper number of times, but having a command that somehow does this directly would be nice. 我能夠經過手動按Ctrl + E (或Ctrl + Y )適當的次數來實現此目的,可是使用某種能夠直接執行此操做的命令會很好。 idea
Any ideas? 有任何想法嗎? spa