Questions tagged [scrolling]
For questions about scrolling, and configuring the behavior of vim-scrolls
113 questions
1 vote
0 answers
56 views
Scrollbind the window to the right on <C-ScrollWheelDown>
I would like to remap <C-ScrollWheelUp> / <C-ScrollWheelDown> to a scroll which acts like scrollbind the window to the right, and <C-ScrollWheelLeft> / <C-ScrollWheelRight> to ...
0 votes
0 answers
80 views
How to properly map <C-u> and <C-d> to have similar definitions (respecting 'scroll') while ignoring wrapped lines with Lua in Neovim?
Using Neovim (currently on v0.11.2 with kickstart.nvim) I personally use line wrapping most of the time when editing text, and I navigate between distant lines, with the help of 'relativenumber', ...
1 vote
0 answers
97 views
Vim slow upwards scrolling in file with vim9script
If I open the file popup.vim in vim and go to the bottom with G, then scrolling upwards with k is extremely laggy. The problem only occurs if I hold down k, pressing it repeatedly it works fine. ...
1 vote
1 answer
58 views
Prohibit Vim scrolling when the cursor is near the bottom of the window
Enter moves the cursor without scrolling the screen until the cursor is close to the bottom of the window. Then data scrolls up such that the cursor never gets to the bottom. Can this bottom scrolling ...
0 votes
0 answers
47 views
Can you scroll past the beginning of a file? [duplicate]
Summary After the last line of a file, there are extra lines. Is there a way to get these before the first line of the file? Here is a similar Emacs plugin to demonstrate what I mean. Example For ...
1 vote
0 answers
42 views
Hide first n columns in window
When I compare pieces of code in vim, often I'd like to open a vertical split, so that I can see and compare more lines. Oftentimes, the code is indented, and I use zs to position the code at a ...
1 vote
1 answer
252 views
How to scroll beyond the top of the buffer?
Gzz will go to the last line in the buffer and then scroll such that it is in the middle of the screen. ggzz doesn't do this. The zz won't move the first line to the middle of the screen. How can I ...
2 votes
1 answer
91 views
Can you prevent then screen jumping when toggling the wrap option?
When I enable the wrap option, the first line of the viewport remains fixed and the lines below it are all shunted down as they are wrapped. This means the cursor line jumps down too, which is ...
0 votes
0 answers
146 views
Issue: Vim scrolls when cursor is moved
I'm not exactly sure what triggers this behavior, but my vim randomly starts scrolling in response to cursor movement (mouse and touchpad). It always scrolls down. Restarting the terminal restores the ...
0 votes
0 answers
158 views
How to set the scrolloff for the pop up menu?
setlocal scrolloff=1 changes the scrolloff for the buffer. I want to change the scrolloff for the popup menu when I press <C-N> or <C-P> in INSERT mode. The scrolloff variable has no ...
0 votes
0 answers
98 views
Scroll to top of previous terminal command
I am using vim to compile my code using the command :w | !make. If this output produces a lot of compiler errors (not uncommon lol), then I'd like to scroll to the top of the output, where the command ...
4 votes
1 answer
684 views
Is it possible to scroll a popup via keyboard?
If I do :let id = popup_create(['hello', 'hello', ... a lot of these, 'hello'], {}), I can reproduce the case of a popup that contains more items that its height, thus having a scrollbar. How do I ...
0 votes
0 answers
47 views
How to window leftcol without switching to the window
winsaveview() returns multiple details about the window including the leftcol which is the amount of horizontal scroll. However you need to switch to the window to get that. getwininfo() returns ...
0 votes
0 answers
93 views
scroll line to specific screen line
I am search for the opposite of winline(). winline() returns the screen line in the window of the current cursor position. I want to be able to set it. Therefore scroll the windows content so that the ...
2 votes
0 answers
40 views
Can Vim scroll by "window lines" rather than "buffer lines"? [duplicate]
When scrolling in a document with long, wrapped lines, the document will jump up and down by multiple lines when the cursor reaches the top or bottom of the window. Vim always shows the beginning of a ...