Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a border between the line numbers and text in Vim

Tags:

terminal

vim

I'd like to have a thin border line to the right of the line numbers and to the left of the text.

like image 402
yndolok Avatar asked Oct 09 '12 04:10

yndolok


People also ask

How do I hide line numbers in vim?

Make the vi/vim text editor show or hide line numbers Press ESC key. At the : prompt type the following command to run on line numbers: set number. To turn off line numbering, type the following command at the : prompt set nonumber.


2 Answers

You might use different color to highlight LineNr. For example:

:hi LineNr   cterm=bold ctermbg=gray ctermfg=black gui=bold guibg=gray guifg=white
like image 187
kev Avatar answered Nov 09 '22 01:11

kev


I don't think that's possible.

However, you can make the gutter wider.

:set numberwidth=3
like image 32
alex Avatar answered Nov 09 '22 02:11

alex