2

Is there a way to add some buffer space between the vertical separator and the content of a file in vertical split mode?

Another way to say this: How do I force vim to not let a line touch a vertical separator. Yes, line wrapping is on. I do not want the line to touch the vertical separator, nor the edge of the screen if it is on the right split.

2

This is perhaps not exactly what you're looking for, but setting the 'linebreak' option adds enough whitespace to the right margin to create enough of a visual buffer, when 'wrap' is enabled.

Typically, it will insert at least one space before the end of a wrapped line. If a word would end exactly at the margin, adding a space will move it to the next line. One of the few exceptions where a word can touch the right margin is if it's the last word in a line (so no wrapping occurs there.)

Hopefully this will be close enough to what you're looking for.

  • 1
    Good enough for me. Thanks – K. Shores Jul 14 at 17:53
0

Quick thoughts:

  1. If the lines are too long, try set wrap
  2. You could also resize the window with the resizing commands (e.g. <C-w>>)
  • I already have line wrapping on. That would be why I am asking how to add a buffer space so that it is easier to differentiate the text where they meet. – K. Shores Jul 14 at 13:39
  • @K.Shores sorry i missed that in the title. AFAIK the answer is no, that is not possible. But feel free to edit your question to clarify exactly what you have and what you want. – D. Ben Knoble Jul 14 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.