I find my self often, especially after this site was created, opening Vim just to type :h ... or :helpgrep ....

What I would like to do is to run Vim and immediately open the help topic that I want. How can I do this?

1 Answer 1


Use the -c argument to execute a command after Vim starts up:

vim -c ':help TOPIC' -c :only

You may want to define a shell function:

vimhelp () {
  vim -c ":help $1" -c :only
  • (t)csh alias: alias vimhelp 'vim -c ':help $1' -c :only' Mar 7, 2015 at 17:51
  • 3
    @Carpetsmoker Did you find a time machine to go back to the late 1980s/early 1990s, the time when tcsh was worth using? Can you share? Mar 7, 2015 at 17:53
  • @Gilles some people still post questions about it on AU/U&L - corporate environments, I suppose. :(
    – muru
    Mar 8, 2015 at 18:33
  • You can also put the :only option in the same command: vim -c ':help TOPIC | only' Jul 26, 2020 at 9:54

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.