高版本自动启用了,低版本(7)有些没启用缩进
查看 :filetype
启用 :filetype indent on | filetype detect
or
vi --cmd 'filetype indent on' file.sh