c++ - vundle 不能与 ftplugin 一起正常工作

标签 c++ vim vim-plugin vundle ftplugin

我开始使用 ftplugin。这基本上是有效的,除了 bundle 。如果我用一个没有特定文件类型的文件启动 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您可以找到解决方案。

关于c++ - vundle 不能与 ftplugin 一起正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36559980/

相关文章:

vim 使用 <c-i> 向前跳转对我来说也不起作用(snipmate)

linux - searchvim 是如何工作的?

vim - 如何在 VIM 中显示搜索结果出现的滚动条上启用突出显示?

c++ - const 类方法是否会阻止在类外分配变量?

c++ - 使用 Boost.Bind 表达教会数字

linux - 如何使用 vi 在 Linux 的终端中编辑命令?

vim - 如何在 Vim 中准确跳转到最后一个变化点

c++ - 函数的右值引用和返回值

c++ - 自定义 C++ 四元数旋转无法正常工作

vim - 命令-t找不到文件