3

Vim always has 3 spaces for the line numbers on the left, in the gutter. Since I set relativenumber, and (unfortunately) don't have a monitor with the vertical space for 100 lines, I will never need more than 2 places for the line number. The leftmost column is always an extra space.

How can I reclaim that valuable screen real estate?

Eggrenade
  • 81
  • 1
  • 5

1 Answers1

5

Vim automatically sets the gutter spacing, but it has some constraints. Notably, numberwidth determines the minimum number of columns reserved for the gutter. The default is 4, 3 for the numbers and 1 for the space separating the numbers from the text. That's one too many in this case, so set numberwidth=3 in your vimrc, and you should be good to go.

Additionally, if you want 80 columns of text in your gvim windows, set columns=83 will give you 2 line numbers, 1 space, and 80 columns.

Eggrenade
  • 81
  • 1
  • 5