문제

The following file is my vimrc file. I tried sourcing snipmate.vim file, there is no set paste in my vimrc file. just did a git clone of the snipmate in my .vim directory and added the location to the runtimepath.

I am using 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. What am I doing wrong?

도움이 되었습니까?

해결책

You should use pathogen. It does all of this runtimepath stuff for you.

다른 팁

You could use Vundle too. It'll let you download and enable plugins directly from Github.
All I have to do to enable a new plugin is a single line in my .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:

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. For a complete setup using Vundle with automatic install on first-run take a look at my vimconf.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top