Why vundle requires filetype off

前端 未结 3 1509
无人及你
无人及你 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:41

    This is the answer to your WHY, I took it from Vundle's contributor. Basically, what he meant is you need to turn of off to avoid unexpected behaviors when Bundle commands are running. And after that, you can turn it back on.

    After the bundles block. File type detection must be enabled after the Bundles block because the runtime path is updated by every Bundle command and that could potentially bring new file types or more plugins for specific file types. It also appears that turning it on, when it's on, does nothing, so it must be turned off before.

    If you are reluctant to turn it off because it affects some file type detection, please try a newer vim version, with the 430th patch (quite unluckily, Ubuntu picked up only up to the patch right before that one.)

提交回复
热议问题