vimtricks.wiki Concise Vim tricks, one at a time.

How do you keep context columns when scrolling horizontally?

Answer

set sidescrolloff=5

Explanation

Set sidescrolloff to keep at least 5 columns visible on each side of the cursor during horizontal scrolling. Works with nowrap mode.

Next

How do I visually select a double-quoted string including the quotes themselves?