windows 不能在windows下使用带有病原体的gvim
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4961921/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't use gvim with pathogen under windows
提问by Chris Nicola
I have pathogen setup and working fine under Linux, but when I try to use the some configuration with gvim73 under windows it doesn't work at all. I don't get any errors but it does nothing.
我有病原体设置并且在 Linux 下工作正常,但是当我尝试在 Windows 下使用带有 gvim73 的某些配置时,它根本不起作用。我没有收到任何错误,但它什么也没做。
Here is my dotfiles repository up on git. I've checked this out to ~/vimfiles and I added the following to _vimrc:
这是我在 git 上的 dotfiles 存储库。我已将其检查到 ~/vimfiles 并将以下内容添加到 _vimrc:
filetype off
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
I've tried just about everything including putting the autoload/pathogen.vim and bundles/ folders in the /vim73 directory under program files. Nothing.
我已经尝试了几乎所有方法,包括将 autoload/pathogen.vim 和 bundles/ 文件夹放在程序文件下的 /vim73 目录中。没有。
Does anyone have some experience with this? I'm assuming there is something windows specific that needs to happen to make this work.
有没有人有这方面的经验?我假设有一些特定于 Windows 的东西需要发生才能完成这项工作。
Edit: It is probably also worth noting I can run pathogen#runtime_append_all_bundles()
even using tab completion so pathogen is being loaded, but my plugins are just not working.
编辑:可能还值得注意的是,我pathogen#runtime_append_all_bundles()
什至可以使用选项卡完成来运行,因此正在加载病原体,但我的插件无法正常工作。
采纳答案by Xavier T.
I had some kind of issue on Windows when I used the pathogen version provided by Vim.org
当我使用 Vim.org 提供的病原体版本时,我在 Windows 上遇到了一些问题
However, using github pathogen head, the issue was fixed.
但是,使用github pathogen head,问题得到了解决。
I think the latest release from Vim.org is from January last year, and the latest commit on github is from November.
我认为 Vim.org 的最新版本是去年 1 月的,而 github 上的最新提交是 11 月的。
Specifically, I had this issue with after directory:
https://github.com/tpope/vim-pathogen/issues/closed#issue/12
具体来说,我在目录之后遇到了这个问题:https:
//github.com/tpope/vim-pathogen/issues/closed#issue/12
回答by Chris Nicola
I'm not sure it will help but here is my working configuration:
我不确定它会有所帮助,但这是我的工作配置:
- d:\soft\vim\vim73\ - gvim itself, i.e. pathogen.vim is copied into the d:\soft\vim\vim73\autoload\
- d:\soft\vim\vimfiles\bundle - directory for plugins
- d:\soft\vim\vim73\ - gvim 本身,即 pathogen.vim 被复制到 d:\soft\vim\vim73\autoload\
- d:\soft\vim\vimfiles\bundle - 插件目录
Corresponding lines from configuration file d:\soft\vim\_vimrc:
配置文件 d:\soft\vim\_vimrc 中的对应行:
" Use pathogen to load plugins from bundle directory
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
Also I changed pathogen#helptags because original didn't work for my paths:
我也改变了 pathogen#helptags 因为原件不适用于我的路径:
dir[0 : strlen($VIM)-1] !=# $VIM has been changed to stridx(dir, "bundle") != -1
回答by brymck
It's an old question, but I had the same issue and solution as the OP, and it has a mildly annoying origin. I was using the following script to install everything on Windows (Vista+ and run as admin if you want the mklink
part to work):
这是一个老问题,但我遇到了与 OP 相同的问题和解决方案,而且它的起源有点烦人。我使用以下脚本在 Windows 上安装所有内容(Vista+ 并以管理员身份运行,如果您希望该mklink
部分工作):
cd "%UserProfile%"
rmdir vimfiles /S /Q
git clone http://github.com/brymck/dotvim.git vimfiles
del _vimrc
mklink _vimrc vimfiles\vimrc
cd vimfiles
git submodule init
git submodule update
The above is just a Windows-y version of a Vimcast on syncing your Vim preferences with GitHuband is fairly straightforward, so I figure others may be doing something similar.
以上只是Vimcast的 Windows y 版本,用于将您的 Vim 首选项与 GitHub 同步,并且相当简单,因此我认为其他人可能正在做类似的事情。
Anyway, your experience may differ (and this doesn't apply to Cygwin), but when I just copied and pasted this into the terminal, git submodule update
got "eaten" while git submodule init
was running. I didn't figure it out initially because this had never happened to me on Linux. In short, wait until everything else has completed before running git submodule update
and you should be golden. (Also, FWIW, I'm using the current version of pathogen, which was last updated September 25, 2011.)
无论如何,您的体验可能会有所不同(这不适用于 Cygwin),但是当我刚刚将其复制并粘贴到终端时,在运行git submodule update
时git submodule init
被“吃掉”了。我最初没有弄明白,因为这在 Linux 上从未发生在我身上。简而言之,等到其他一切都完成后再运行git submodule update
,你应该是金色的。(另外,FWIW,我使用的是当前版本的 pathogen,该版本上次更新时间为 2011 年 9 月 25 日。)
回答by tonicebrian
For me renaming the .vim folder into vimfiles solved the problem for Vim 7.4.
对我来说,将 .vim 文件夹重命名为 vimfiles 解决了 Vim 7.4 的问题。
回答by ktr
I know this is a long time ago, but maybe it will help someone ... I had the same issue. It wouldn't give me any errors, but no plugins would be loaded. I then RTFM and noticed that he explicitly states at the top of thispage that it should go in your vimrcnot gvimrc. After I changed that I had no problems.
我知道这是很久以前的事了,但也许它会帮助某人......我遇到了同样的问题。它不会给我任何错误,但不会加载任何插件。然后我RTFM,发现他在明确的顶部指出此页,它应该在你走的vimrc没有的gvimrc。在我更改后,我没有问题。