把文件类型设为html,然后全选代码执行"="号
:filetype indent on
:set filetype=html #set ft
:set smartindent #set si
常用vim默认设置,在~/.vimrc文件中添加如下代码
set nobackup
set nowritebackup
set noswapfile
set lines=40
set columns=80
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set hlsearch
filetype indent on
filetype on
filetype plugin on