2

By default the cursor is always on a column that contains real text. 1 2 3 4 5 6 7 8 9 1 2 3 4 5 1 2 3 4 5 6 7 8 9 If your cursor is in line 1 on the character '9' and you move down, the cursor "jumps" to the character '5' in the second line. If you move down again, it jumps to the '9' in the third line. Because of this change of the cursor column, the ...


1

So after asking the Neovim issue tracker it turns out this is the current "expected" behavior of the code: In terminal.c the function adjust_topline() iterates over FOR_ALL_WINDOWS_IN_TAB, changing that to iterate over FOR_ALL_TAB_WINDOWS fixes my issue. I'm not sure of the implications regarding the performances of this change, but if the neovim community ...


1

I guess you want the horizontal scrollbar on nowrap. You can handle this with a autocmd, like: autocmd OptionSet wrap if &wrap|set guioptions-=b|else|set guioptions+=b|endif If you change the option wrap during runtime, this will automatically switch on/off the horizontal scrollbar. The autocommand is not triggered on startup (sourcing vimrc), see :...


1

Perhaps au BufWinEnter * exe "normal zz" But I guess there will be side effects. Test thoroughly. One side effect: Assume you have 2 buffers loaded and Vim has only one ("full terminal") window. So one buffer is displayed. The other is hidden. If you switch to the hidden buffer, zz will be executed.


1

There is a workaround to achieve this: :set scrolloff=999


1

You could create a mapping and use it instead of using zi. Create a mark for the current position and one for the top of the visible buffer, apply zi, move to the top, move the buffer, then move back to the original position. nnoremap <Leader>zi maHmb'azi'bzt`a


Only top voted, non community-wiki answers of a minimum length are eligible