When using set number and set numberwidth I'd like to have the line numbers padded with zeros instead of spaces. example:000100020003Can it be done?
Is there an option to zero-pad line numbers?
line numbers
AFAIK, this can only be done by changing the Vim source code and rebuilding.The changes you need to make are as follows:For zero-padded number, in src/screen.c on lines 2502 and 3712, replace:char *fmt = %*ld ;withchar *fmt = %0*ld ;For zero-padded relativenumber, in the same file, on lines 2519 and 3725, replace:fmt = %-*ld ;withfmt = %0*ld ;Line numbers noted above are for the current version on Github, 7.4.1799.