Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to run :helptags ~/.vim/doc in vim, but from command line.

The purpose is to run the command occasionally with other commands to keep my tools up-to-date (probably in a cron job on my development machine.

I looked around man vim, but cannot figure out what option I need to pass.

I think this is a general question for vim, but I'm using Mac and Ubuntu for the development.

share|improve this question
up vote 1 down vote accepted

From the vim(1) man page:


   -c {command}
               {command}  will  be  executed after the first file has been
               read.  {command} is interpreted as an Ex command.   If  the
               {command}  contains  spaces  it  must be enclosed in double
               quotes (this depends on the shell that is used).   Example:
               Vim "+set si" main.c
               Note: You can use up to 10 "+" or "-c" commands.


   --cmd {command}
               Like using "-c", but the command is  executed  just  before
               processing  any  vimrc file.  You can use up to 10 of these
               commands, independently from "-c" commands.

Just put :q! as the final command if you want to get back out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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