Reputation: 2587
I am trying to make vim portable by statically compiling it and then using my own vimrc and plugins and stuff that lives in my portable directory...
I have recently used vi omnicomplete plugin that says to install it in ~/.vim/ directory... It works fine...
but i want my portable vim to locate the omnicomplete plugin from the current working directory that happens to be my vim portable dir... which is not working if i just install the omnicomplete plugin folders to the current working directory...
vim either in usr/bin or my portable one happens to be searching the omnicomplete stuff from the default ~/.vim/ dir which i dont want because my aim is to make it really portable..
i was able to use my custom vimrc and all the plugins from /usr/share/vim/vim72/plugin just by copying it to my pwd and then setting up the VIM and VIMRUNTIME env vars to pwd
but the same trick isnt working with omnicomplete plugin..
any help is really appreciated.
Thanks.
Upvotes: 1
Views: 1294
Reputation: 40789
The compl-omni-filetypes
help section says that the filetype specific commands should be in autoload/{filetype}complete.vim
relative to 'runtimepath'
That tells me that you might be able to figure out a way to set your runtimepath
based on the current directory when you start up, and have your omnicomplete code in the appropriate subdirectories.
The wording on the help file leads me to believe that the overall runtimepath
folder structure is assumed in code, therefore not easily modified for ultra-portability.
You may want to consider a standard environment variable that describes the root of your ultra-portable installation of vim, and set the runtime path using that environment variable.
Upvotes: 2