[英]snipmate is not working in vim
The following file is my vimrc file. 以下文件是我的vimrc文件。 I tried sourcing snipmate.vim file, there is no set paste in my vimrc file.
我尝试采购snipmate.vim文件,我的vimrc文件中没有设置粘贴。 just did a git clone of the snipmate in my .vim directory and added the location to the runtimepath.
刚刚在我的.vim目录中执行了snipmate的git clone,并将该位置添加到了runtimepath。
I am using MAC OSX 我正在使用MAC OSX
$ cat .vimrc
source ~/.vim/snipmate.vim/plugin/snipMate.vim
nnoremap <Space> za
vnoremap <Space> za
nnoremap zO zCzO
set smartindent
set hlsearch
set ignorecase
set foldenable
set foldmethod=syntax
syn region foldBraces start=/{/ end=/}/ transparent fold
syn region foldJavadoc start=,/\*\*, end=,\*/, transparent fold keepend
set ai
set sm
set incsearch
set runtimepath^=~/.vim/bundle/ctrlp.vim,~/.vim/nerdtree,~/.vim/snipmate.vim
set nocompatible " Because filetype detection doesn't work well in compatible mode
filetype plugin indent on " Turns on filetype detection, filetype plugins, and filetype indenting all of which add nice extra features to whatever language you're using
syntax enable " Turns on filetype detection if not already on, and then applies filetype-specific highlighting.
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.class
set diffopt+=iwhite "Ignore whitespaces in vimdiff"
filetype plugin on
tree structure of snipmate 螃蟹的树状结构
$ tree .vim/snipmate.vim/
.vim/snipmate.vim/
├── README.markdown
├── after
│ └── plugin
│ └── snipMate.vim
├── autoload
│ └── snipMate.vim
├── doc
│ ├── snipMate.txt
│ └── tags
├── ftplugin
│ └── html_snip_helper.vim
├── plugin
│ └── snipMate.vim
├── plugin-info.txt
├── snippets
│ ├── _.snippets
│ ├── autoit.snippets
│ ├── c.snippets
│ ├── cpp.snippets
│ ├── erlang.snippets
│ ├── html.snippets
│ ├── java.snippets
│ ├── javascript.snippets
│ ├── mako.snippets
│ ├── objc.snippets
│ ├── perl.snippets
│ ├── php.snippets
│ ├── python.snippets
│ ├── ruby.snippets
│ ├── sh.snippets
│ ├── snippet.snippets
│ ├── tcl.snippets
│ ├── tex.snippets
│ ├── vim.snippets
│ └── zsh.snippets
└── syntax
└── snippet.vim
8 directories, 29 files
Other plugins ( ctrl-p and nerdtree ) are working, but snipmate is not. 其他插件(ctrl-p和nerdtree)正在运行,但是snipmate不是。 What am I doing wrong?
我究竟做错了什么?
You could use Vundle too. 你也可以使用Vundle 。 It'll let you download and enable plugins directly from Github.
它允许您直接从Github下载并启用插件。
All I have to do to enable a new plugin is a single line in my .vimrc
: 我需要做的就是启用一个新的插件是我的
.vimrc
一行:
Bundle 'Rip-Rip/clang_complete'
As for Snipmate, Garbas/vim-snipmate is the new maintainer, and it has a couple of dependencies, but it's still easy to install using Vundle: 至于Snipmate, Garbas / vim-snipmate是新的维护者,它有几个依赖项,但使用Vundle仍然很容易安装:
Bundle 'MarcWeber/vim-addon-mw-utils'
Bundle 'tomtom/tlib_vim'
Bundle 'honza/vim-snippets'
Bundle 'garbas/vim-snipmate'
Personally I think it's the better alternative, but it depends on wether you want to control Git submodules yourself or let Vundle do everything. 我个人认为这是更好的选择,但这取决于你想要自己控制Git子模块还是让Vundle做所有事情。 For a complete setup using Vundle with automatic install on first-run take a look at my vimconf .
有关使用Vundle在首次运行时自动安装的完整设置,请查看我的vimconf 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.