Problem:
Linux System, Tab key defaults to 8 characters, you need to change it to 4 characters in a way that uses
Steps:
1. Create a system file with a. vimrc file name under the user's root
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/77/ED/wKioL1ZxQ3zxjVhEAAAVaoxBUfE164.png "title=" 1.PNG " Style= "Float:none;" alt= "Wkiol1zxq3zxjvheaaavaoxbufe164.png"/>
[Email protected] ~]# CD ~
[Email protected] ~]# pwd
/root
[[email protected] ~]# vim. VIMRC
2. Enter the following contents in the file and save
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/77/ED/wKioL1ZxQ3zTphd_AAAFPdle50w416.png "title=" 2.PNG " Style= "Float:none;" alt= "Wkiol1zxq3ztphd_aaafpdle50w416.png"/>
Input content:
Set tabstop=4
Set shiftwidth=4
Description
TabStop represents the length of a tab that shows how many spaces are, by default, 8.
Shiftwidth indicates the length of each level indent
Summarize:
1.vim configuration files need to be built themselves, as hidden files
2. the . VIMRC configured under the current user is valid only for the current user
3. in .VIMRC file We can customize a variety of initialization settings, each time you open vim is reading the configuration file
1). Line number: Set Number,set nu ;
2). parentheses match highlighting: set Showmatch, set SM ;
3). Auto Indent: set AI ;
4). Highlight Search results: Set Hlsearch ;
5). syntax Highlighting: Syntax on ;
6). Ignore character case: s et ICS ;
This article is from the "Xu Ding blog" blog, make sure to keep this source http://xuding.blog.51cto.com/4890434/1725376
How to set the tab indent---Configuration initialization settings in VIM