3

This question already has an answer here:

If some characters are concealed in a line, so that the effectively the entire line is visible, and nowrap is set, moving to the end of the line can cause Vim to scroll if the actual line length is greater than what can be displayed. Lines without concealed characters aren't affected.

For example:

enter image description here

The terminal is 95 characters wide. The current line is 78 characters long, and since it has nothing concealed, it doesn't scroll. The line above does have concealed characters, and it scrolls, leaving a jagged edge:

enter image description here

The displayed part of both lines fit comfortably in 95 characters. Concealed characters are completely hidden (set concealcursor=nvic conceallevel=3).

Can I tell Vim to not scroll in such cases?


Using set sidescrolloff=0 had no effect.

In this case, I'm viewing manpages, and I know that the visible length will never be more than the display area. In this case, just disabling sidescrolling altogether would be fine.

marked as duplicate by muru Mar 24 '16 at 15:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Very related: How to disable horizontal scrolling? ... possible duplicate? – Martin Tournoij Mar 24 '16 at 14:58
  • @Carpetsmoker if I read that right, there's no way to disable it? – muru Mar 24 '16 at 15:17
  • Not as far as I − or apparently anyone else − was able to figure out... :-/ – Martin Tournoij Mar 24 '16 at 15:19
  • @Carpetsmoker Sigh. Conceal was showing so much promise. I think I'll go back to removing backspaces. :/ – muru Mar 24 '16 at 15:23
  • Conceal unfortunately has some quirks, like this one (there are others) ... The implementation is rather hackish :-/ – Martin Tournoij Mar 24 '16 at 15:31

Browse other questions tagged or ask your own question.