1. Install Vim
Sudo apt-Get install Vim
2. you can create your own configuration file in the home directory.
Switch to the Home Directory # Cd ~
Touch a file named. vimrc (hidden file starting)
# Touch. vimrc
# Vi. vimrc
Enter the following Configuration:
Set nocompatible does not use the default VI keyboard layout <---- this is very important. If it is not configured, it is annoying to enter characters by pressing the direction key in editing mode.
Set nu display row number
Set autoindent Automatic Alignment
Set smartindent smart alignment
Set showmatch matching mode
Set ruler display status line
Set incsearch
Set tabstop = 4 The Tab key is 4 spaces
Set shiftwidth = 4
Set softtabstop = 4
Set cindent C language format alignment
Set nobackup does not Back Up Files
Set clipboard + = unnamed shares the clipboard with Windows
Set fileencodings = UTF-8, gb2312 character encoding
Save and exit. If syntax highlighting is supported, the configuration is syntax on.
From: http://zhys1226.blog.163.com/blog/static/126217868201151011155437/