我开始使用ftplugin。这基本上是可行的,除了捆绑。如果我用一个没有特定文件类型的文件启动gvim,那么我可以使用我的所有插件(:VundleInstall列出了.vimrc中指定的所有插件)
但是,当我以.cpp类型打开一个文件,从而使用. .vim/after/ftplugin/cpp.vim时,唯一的活动插件(如:VundleInstall所示)是cpp.vim文件中指定的插件。
我犯了什么错?
这是我的视频:
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
....我缩短了映射和插件的长列表,用点替换它(.)
发布于 2016-04-14 07:48:26
如果有人遇到同样的问题:
在这个线程中,您可以找到解决方案。
https://stackoverflow.com/questions/36559980
复制相似问题