Why vundle requires filetype off

前端 未结 3 1510
无人及你
无人及你 2021-01-01 10:52

On vundle\'s homepage, it documented that it requires filetype to be off in .vimrc:

 filetype off                   \" required!
 set rtp+=~/.vim/bundle/vund         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 11:37

    I wanted to address the why part of this problem.

    Most of this answer is from the following github thread

    https://github.com/VundleVim/Vundle.vim/issues/176

    It is Vim's feature.
    Vim makes cache for filetype plugins from runtimepath. So if vundle changes runtimepath, it must reset before calling.

    It's also said there that this problem was only there before 7.3.430.

    As @Maxim Kim has answered, its better to turn it on after everything related to Vundle

    set nocompatible
    filetype off
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    
    " Let vundle manage itself:
    Plugin 'VundleVim/Vundle.vim'
    " Syntax checking plugin
    Plugin 'scrooloose/syntastic'
    
    call vundle#end() 
    
    filetype plugin indent on " Filetype auto-detection
    syntax on " Syntax highlighting
    

提交回复
热议问题