Add Number command that adds line numbers

This commit is contained in:
Talia 2018-08-02 13:49:05 +02:00
parent d3ccd7e0e6
commit b818fbf132

3
vimrc
View file

@ -326,6 +326,9 @@ command! -range Count echo(<line2>-<line1>+1)
command! Closeall bufdo bdelete
command! Context bufdo bdelete | e .
command! Kontext Context
command! -range=% Numbers <line1>,<line2>
\s/^/\=printf("%0".printf("%f", floor(log10(<line2>)))."i", line("."))."\t"/
\ | noh
command! L lopen | set number | set norelativenumber
command! LAddLine call LocationAddLine(expand("%"), line("."), getline("."))