编辑vimrc文件:

sudo vim /etc/vimrc
# or
sudo vim /usr/share/vim/vimrc
# or
sudo vim ~/.vimrc

添加如下内容:

syntax enable

set number
set ruler
set numberwidth=1

set autoindent
set cindent

set tabstop=4
set softtabstop=4
set expandtab
set smarttab
set shiftwidth=4

set enc=utf-8
set fileencoding=utf-8

保存并退出。

Comments
Write a Comment