[英]SnipMate in Vim on Windows
What is wrong with my install of snipMate? 我安装的snipMate有什么问题? I cannot get it to work.
我无法正常工作。 I even tried installing Pathogen as noted in the other answer.
我什至尝试按照其他答案中的说明安装Pathogen。 I am running vim7.4 on a windows XP.
我在Windows XP上运行vim7.4。 The _vimrc is noted below -
_vimrc如下所示-
set nocompatible
set textwidth=80
set formatoptions=cqrol
set ts=2
set expandtab
set guifont:Courier_New:h8:cANSI
set backupdir=$temp
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
filetype plugin on
autocmd BufEnter * setlocal cursorline cursorcolumn
hi cursorcolumn ctermbg=247 guibg=grey70
hi cursorline ctermbg=247 guibg=grey70
call pathogen#infect()
The VIM install directory structure looks like below. VIM安装目录结构如下所示。 It is after I unzipped the snipMate.zip to vim74 folder.
我将snipMate.zip解压缩到vim74文件夹后。
c:\program files\vim\vim74
after/
autoload/
colors/
compiler/
doc/
ftplugin/
indent/
keymap/
lang/
macros/
plugin/
snippets/
spell/
syntax/
tools/
tutor/
README.txt
bugreport.vim
delmenu.vim
diff.exe*
evim.vim
filetype.vim
ftoff.vim
ftplugin.vim
ftplugof.vim
gvim.exe*
gvimext.dll
gvimrc_example.vim
indent.vim
indoff.vim
install.exe*
libintl.dll
macmap.vim
makemenu.vim
menu.vim
mswin.vim
optwin.vim
rgb.txt
scripts.vim
synmenu.vim
uninstal.exe*
uninstal.txt
uninstall-gui.exe*
vim.exe*
vimrc_example.vim
vimrun.exe*
vimtutor.bat*
xxd.exe*
.swp
I'm a Unix guy and don't know much about Windows, but try the following steps: 我是Unix人士,对Windows不太了解,但是请尝试以下步骤:
1) Per default pathogen searches in your personal folder ($HOME\\vimfiles\\bundle) and not in Vim's installation directory 1)默认的病原体搜索在您的个人文件夹($ HOME \\ vimfiles \\ bundle)中,而不在Vim的安装目录中
2) Put call pathogen#infect()
at the top of your vimrc 2)将
call pathogen#infect()
放在vimrc的顶部
3) Maybe try commenting out the two mswin lines, maybe they interfere somehow 3)也许尝试注释掉两个mswin行,也许它们以某种方式干扰了
4) Which snipmate did you use? 4)您使用了哪个狙击手? There is the old, unmaintained version from msanders (I still use this one) that has no depedencies and there is a fork by garbas that actually has dependencies
有一个从旧的,没有维护版本msanders (我仍然使用这一个),有没有depedencies并有一个叉通过garbas实际上具有依赖性
Okay finally problem solved. 好的,问题终于解决了。 After some reading and trial&error, I stumbled upon this question which did it.
经过一番阅读和反复试验后,我偶然发现了这个问题 。 The path separator slashes in the _vimrc are "\\" by default.
_vimrc中的路径分隔符斜杠默认为“ \\”。 But they need to be "/".
但是它们必须为“ /”。 Thank you those who helped with their answers and comments.
谢谢那些为他们的答案和评论提供帮助的人。
The working _vimrc file is shown below - _vimrc工作文件如下所示-
"for pathogen
runtime ../vimfiles/bundle/vim-pathogen-master/autoload/pathogen.vim
execute pathogen#infect()
execute pathogen#helptags()
"for snipmate
let g:snippets_dir="$VIMRUNTIME/../vimfiles/bundle/sv-snippets/snippets"
set nocompatible
set textwidth=80
set formatoptions=cqrol
set ts=2
set expandtab
set guifont:Courier_New:h8:cANSI
set backupdir=$temp
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
filetype plugin indent on
syntax on
autocmd BufEnter * setlocal cursorline cursorcolumn
hi cursorcolumn ctermbg=247 guibg=grey70
hi cursorline ctermbg=247 guibg=grey70
Some notes about this _vimrc - 有关此_vimrc的一些说明-
The directory structure I use - 我使用的目录结构-
c:\program files\vim\vim74 - vim install, given by $VIMRUNTIME
c:\program files\vim\vimfiles\bundle - plugins such as pathogen, snipmate
c:\program files\vim\_vimrc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.