I have set number in my init.vim (I am using neovim) and it works fine for any buffers I'm editing. However, I have to enter :set number into the command line to make line numbers appear in the documentation. This goes for other display settings I have as well (such as wrapping links in the documentation with vertical bars: can't set it in my init.vim, have to manually set it once I enter the documentation. How to I make settings from my init.vim apply to the documentation?

Notably the colorscheme I set in my init.vim file does apply to the documentation.

1 Answer 1


You can set number and/or relativenumber for the help docs like so:

augroup vim help
    autocmd FileType help setlocal number
    autocmd FileType help setlocal relativenumber
augroup END
  • 3
    You missed augroup END, and idk if the name can be more than one word. Also consider ftplugins for this
    – D. Ben Knoble
    May 29, 2021 at 0:40
  • 2
    Thanks @D.BenKnoble. I know that you can use more than one word for the group name. I didn't know about ftplugins - I'll look them up, cheers!
    – mattb
    May 29, 2021 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.