vim的tab缩进及用空格设置

编辑~/.vimrc文件,分别设置用空格而不是用tab,一个tab多少个空格,自动缩进多少宽度,显示行号。
set expandtab
set tabstop=4
set shiftwidth=4
set nu
set cursorline
 
下次用vim打开文件该设置就生效了。
 
 
 
 
 
备忘一下以备下次复制粘帖(/etc/vimrc):
 
set encoding=utf-8
set fileformats=unix,dos
set ignorecase
set smartcase
set showmatch
highlight Comment ctermfg=LightCyan
set expandtab
set tabstop=4
set shiftwidth=4
set cursorline