I can get the bottom of the window to display partial lines by setting display=lastline
Is there a similar option that would allow partial lines to be displayed at the top of a window?
Without this functionality, my vim still scrolls (down) by more than 1 screen line when the topmost file line being displayed is wrapped into multiple screen lines.
For example, in the following scenario, when I press C-E, my vim will scroll down by 3 screen lines. Is there a way to make it scroll by only 1 screen line such that only the first two words in line 1 are hidden, but the following 3 words are still displayed? This will be very useful for editing long paragraphs of text.
Note: I’m referring to the scrolling of the entire screen, not the movement of cursor.
------------------ 1 abcdefg abcefg abcasdfsa sdfsf sdfc 2 adfadf 3 adfadf 4 adfadf ------------------
I don’t think it is possible to do exactly what you want.
Here’s the description I get when I type
:help CTRL-ENote that while it says it is scrolling the window, it also mentions that it is scrolling lines in the buffer. You really are scrolling only one (wrapped) line at a time.
I don’t think there’s another way around this.
I think
display=lastlineis a false solution – you still scroll the same amount, you just have more visible.The real way to solve this is to disable wrapping:
Edit
Some related threads that show that a “scrolling via screen lines” feature is under consideration, but will take a while to be implemented: