Http://blog.chinaunix.net/uid-346158-id-2131115.html
In the work, it is suspected that the width of a tab in VIM is too large. In the Debian system, the width is 8 characters before it is changed. to change it to 4, see the following:
Cd ~
Vim. vimrc
Add the following lines: (no in the brackets, I added them)
Set shiftwidth = 4 (length of each level of indentation)
Set softtabstop = 4 (indicates that the length of the indent is returned when you press the return key in editing mode)
Set nu (display row number) set autoindent (Auto indent)
: WQ
Save and exit.
Source. vimrc (make the configuration file take effect)
Close the job.
==================
When securecrt Vim is edited today, it is uncomfortable to find that the line breaks automatically when one line reaches 72 characters.
: Set textwidth = 200 or:
: Set Tw = 200
Edit the file.
Vim garbled solution:
Add the following to vimrc (/etc/Vim/vimrc:
Let
& Amp; termencoding = & amp; Encoding
Set
Fileencodings = UTF-8, GBK, ucs-bom, cp936
Vim indent:
Vim sets automatic indent:
Set
Autoindent
Set
Cindent
Vim Tab key width
Set
Tabstop = 4
Set to indent to 4
Set
Softtabstop = 4
Set
Shiftwidth = 4
Do not replace spaces with space keys
Set
Noexpandtab
Show row number:
Set
Number