N
N
nonlux2015-06-23 19:29:00
vim
nonlux, 2015-06-23 19:29:00

How to continue the line numbering column?

Good afternoon. The wording of the question is not correct. I can't find the right item names.
e438ab459e724559b8a4aa0efa8655bc.png
I set line numbering in vim and I would like that after the end of the file, where ~ is the background of the column and the alignment continues. Strongly catches the eye.
Is it real to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Masterov, 2015-06-23
@nonlux

It is possible to recolor the EOL symbols with the background color, which will make them invisible:

augroup NoText
    autocmd!
    autocmd VimEnter,Colorscheme * 
        \ exe 'hi NonText guifg='. synIDattr(synIDtrans(hlID('Normal')), 'bg')
augroup END
It is hardly possible to continue the numbered column in your own color. But for the sake of beauty, you can do it differently by setting a common background (or close to it), redefining LineNr and CursorLineNr in a similar way:
augroup LineNr
    autocmd!
    autocmd VimEnter,Colorscheme * 
        \ exe 'hi LineNr guibg='. synIDattr(synIDtrans(hlID('Normal')), 'bg') 
        \| exe 'hi CursorLineNr guibg='. synIDattr(synIDtrans(hlID('CursorLine')), 'bg') 
augroup END

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question