4

I have set number in my ~/.vimrc, which enables line numbers. Generally they are quite useful, but it can be a bit tricky to discern the actual contents of a numerical data file from the line numbers, even if the line numbers have a different color.

Is there something like a vertical line to separate line numbers from file contents? For example, image on the left is the original state, and in the right the desired result after enabling the vertical line:

How it is   How I would like it to be

The line does not need to be the perfect, continuous line depicted. It could be an ASCII line formed by pipe characters (|), for example, which I guess to be more reasonable in a terminal or Gvim.

Quasímodo
  • 2,466
  • 9
  • 22
  • 1
    Another way could be to use a suitable colorscheme or to tweak your existing colorscheme to have a different background for the number column. See, for example, this and this. – DK Bose Jul 25 '20 at 02:21
  • 1
    Modifying hi LineNr in my colorscheme works for me. – DK Bose Jul 25 '20 at 02:32
  • 1
    @DKBose That does help, thanks! I was really wondering about the line, though, because what Vim puts in its place is just a space and it could well be customizable. Seems to be hardcoded, as I could not find a solution anywhere... – Quasímodo Jul 25 '20 at 12:10

0 Answers0