查了半天,打开命令 :filetype一看是关闭的vim
filetype detection:ON plugin:ON indent:OFFio
在vimrc里打开file
filetype indent on 便可vimrc