Andi Hafner
Andi Hafner

Reputation: 339

How to enable line numbers for the Vim help permanently

I'd like to have line numbers permanently shown in vim, not only for regular text type files rather than for help files too.

Adding set number to the main configuration file of vim (~/.vimrc), as it is suggested in vim line numbers - how to have them on by default?, has no effect for the help file for me.

So where do I have to apply the appropriate configuration change?

Upvotes: 3

Views: 1119

Answers (1)

Kent
Kent

Reputation: 195039

my help shows line number by adding this line in my vimrc :

autocmd FileType help  setlocal number

It seems that you don't have to change vim's file, and don't need the root permission either.

Upvotes: 13

Related Questions