0

I have my own language, the install package is created by autotools.

Part of the package is vim syntax highlighter. How should I install it? Are there any env vars I can rely on (path to vim's install dir etc.)? Any other tips?

3
  • 1
    The standard way to install plugins is to use either Pathogen or Vundle. Both of these are dependent on the user. Installing into vim's install directory is a bad idea since vim might wipe it on an upgrade. Commented Jul 16, 2014 at 18:03
  • 1
    @FDinoff Standard way to install plugins is installing to ~/.vim. Pathogen/Vundle/NeoBundle/VAM/… are popular alternatives that provide a number of benefits, but in :h plugin Vim documentation explicitly suggests using ~/.vim and that is standard. Commented Jul 17, 2014 at 4:14
  • It is also the place where built-in GLVS and Vimball install plugins by default. Commented Jul 17, 2014 at 4:18

1 Answer 1

1

Vim's install process doesn't export or create any alias or environment variable. A few are usable in subshells started from Vim itself with :shell but they are gone as soon as you exit those subshells. Anyway, the directories that those elusive environment variables point to are not safe at all for, among others, the reason given by FDinoff.

If you can, tell your users to place that syntax script in $HOME/.vim/syntax/ (UNIX & Co.) or $HOME\vimfiles\syntax\ (Windows) and add the two lines below to their $HOME/.vimrc (UNIX) or $HOME\_vimrc (Windows):

filetype plugin indent on
syntax on
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.