vundle 不能与 ftplugin 一起正常工作
vundle not working properly with ftplugin
我开始使用ftplugin。这基本上是有效的,除了捆绑包。如果我使用没有特定文件类型的文件启动 gvim,我可以使用我的所有插件(:VundleInstall 列出了 .vimrc 中指定的所有插件)
但是当我打开一个 .cpp 类型的文件并因此使用 .vim/after/ftplugin/cpp.vim 时,唯一活动的(显示为 :VundleInstall ) 插件是在 cpp.vim 文件中指定的插件。
我的错误是什么?
这是我的 vimrc:
syntax on
set nocompatible
set t_Co=256
filetype plugin indent on
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" syntax check during writing
Plugin 'scrooloose/syntastic'
....
"swap two panes in an open session
Plugin 'wesQ3/vim-windowswap'
" All of your Plugins must be added before the following line
call vundle#end() " required
....
这是我的 cpp.vim 文件:
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
"plugin to switch easily between header and source
Plugin 'derekwyatt/vim-fswitch'
" All of your Plugins must be added before the following line
call vundle#end() " required
....
我通过用点 (...) 替换它来缩短映射和一长串插件
如果有人遇到同样的问题:
在此thread您可以找到解决方案。
我开始使用ftplugin。这基本上是有效的,除了捆绑包。如果我使用没有特定文件类型的文件启动 gvim,我可以使用我的所有插件(:VundleInstall 列出了 .vimrc 中指定的所有插件)
但是当我打开一个 .cpp 类型的文件并因此使用 .vim/after/ftplugin/cpp.vim 时,唯一活动的(显示为 :VundleInstall ) 插件是在 cpp.vim 文件中指定的插件。
我的错误是什么?
这是我的 vimrc:
syntax on
set nocompatible
set t_Co=256
filetype plugin indent on
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" syntax check during writing
Plugin 'scrooloose/syntastic'
....
"swap two panes in an open session
Plugin 'wesQ3/vim-windowswap'
" All of your Plugins must be added before the following line
call vundle#end() " required
....
这是我的 cpp.vim 文件:
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
"plugin to switch easily between header and source
Plugin 'derekwyatt/vim-fswitch'
" All of your Plugins must be added before the following line
call vundle#end() " required
....
我通过用点 (...) 替换它来缩短映射和一长串插件
如果有人遇到同样的问题:
在此thread您可以找到解决方案。