Moving vimfiles location breaks snipmate.vim?
I'm working on moving my whole vim config to my Dropbox folder in order share it between machines more effectively. To do this, I've changed my .vimrc to the following:
set runtimepath+=$HOME/My\ Documents/Dropbox/vim
source $HOME\My Documents\Dropbox\vim\vimrc.vim
vimrc.vim looks like this:
set nocompatible
filetype on
filetype plugin on
filetype indent on
syntax enable
The problem is then that snipMate.vim no longer works. I know that there aren't any plugins interfering with it, as I've done a fresh install of vim and removed all the other plugins. It worked perfectly before I moved the plugins to the dropbox folder. I think it may have something to do with the fact that the after directory in vimfiles doesn't seem to be getting read once I move the plugin folder to the dropbox (i.e. after/snipmate.vim only shows up in :scriptnames when I have vimfiles as the plugin folder). I've tried explicitly sourcing the script in the after directory 开发者_Go百科by adding the following to my .vimrc:
source $HOME\My Documents\Dropbox\vim\after\plugin\snipMate.vim
but snipmate still doesn't work.
Any ideas on fixing this?
You have to add the after directory to 'runtimepath'
if you want Vim to look for it.
set runtimepath^=$HOME/My\ Documents/Dropbox/vim
set runtimepath+=$HOME/My\ Documents/Dropbox/vim/after
This follows the normal behavior of having your personal vim directory sourced first, then the system-wide stuff, and finally your personal after directory.
精彩评论