How to use relative line numbering universally in

2020-08-20 08:23发布

I love the relative line numbering feature in Vim 7.3, but am having trouble making it stick universally. For many files, line numbering reverts to absolute mode, even though I have specified:

set rnu

in my .vimrc file. Any idea what could be causing this? I am using Vim 7.3 on OSX 10.6, with the Janus package of extensions.

3条回答
在下西门庆
2楼-- · 2020-08-20 08:47

Try using :verbose set rnu? and :verbose set nu? to find the script that is causing the problem.

查看更多
迷人小祖宗
3楼-- · 2020-08-20 08:54

Add this to your .vimrc.after:

set nonumber

set relativenumber

Relative line numbers should persist with these settings.

查看更多
对你真心纯属浪费
4楼-- · 2020-08-20 08:59

Try putting set rnu at the very end of your .vimrc. Relative numbering is mutually exclusive with absolute numbering. I suspect Janus is trying to be smart and sets absolute numbering for some filetypes.

查看更多
登录 后发表回答