让 vim 从当前工作目录加载omnicomplete
我试图通过静态编译它来使 vim 变得可移植,然后使用我自己的 vimrc 和插件以及位于我的可移植目录中的东西...
我最近使用了 viomomcomplete 插件,该插件表示将其安装在 ~/.vim/ 目录中。 .. 它工作正常...
但我希望我的便携式 vim 从当前工作目录中找到omnicomplete插件,而该目录恰好是我的vim便携式目录...如果我只是将omnicomplete插件文件夹安装到当前工作目录,则该插件不起作用...
vim 要么在 usr/bin 中,要么在我的便携式中,恰好从默认的 ~/.vim/ 目录中搜索全能的东西,这是我不想要的,因为我的目标是使其真正便携..
我能够使用我的自定义 vimrc 和 /usr/share/vim/vim72/plugin 中的所有插件只需将其复制到我的 pwd,然后将 VIM 和 VIMRUNTIME 环境变量设置为 pwd
但同样的技巧不适用于全方位插件..
非常感谢任何帮助。
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
compl-omni-filetypes
帮助部分指出文件类型特定命令应位于autoload/{filetype}complete.vim
相对于'runtimepath'
这告诉我,您也许能够找到一种方法来在启动时根据当前目录设置
runtimepath
,并将您的全能代码放在适当的位置子目录。帮助文件上的措辞让我相信整个
runtimepath
文件夹结构是在代码中假定的,因此不容易修改以实现超可移植性。您可能需要考虑一个标准环境变量来描述 vim 的超便携安装的根目录,并使用该环境变量设置运行时路径。
The
compl-omni-filetypes
help section says that the filetype specific commands should be inautoload/{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.