Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 down vote accepted

From the vim(1) man page:

   +{command}

   -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
add comment

Your Answer

 
discard

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.