开发者

Moving vimfiles location breaks snipmate.vim?

开发者 https://www.devze.com 2023-02-10 03:12 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消