Linux technology: vim display line number, syntax highlighting, automatic indentation settings

  
                  This article on the vim settings only for the UBUNTU system, I have not experimented with other LINUX versions, please understand! Thank you, the configuration file of vim in UBUNTU is stored in the /etc/vim directory. The configuration file name is vimrc. Enter the following command in the terminal to edit the vimrc configuration file: sudo vim /etc/vim/vimrc or sudo gedit /etc/vim/vimrc1 , display the line number to add a new line at the end of the file, enter set nu2, syntax highlighting find the line ""syntax on" in the file, remove the double quotation mark ", double quotation mark is the meaning of the comment 3, automatically indent Add a line at the end of the file, enter set autoindent to add a line, enter set cindent where autoindent is automatically indented; cindent is specifically for C language syntax automatic indentation Note: If the above settings are set, VIM does not make the corresponding action, then please You upgrade your VIM to the latest version, usually just enter the following command in the terminal: sudo apt-get install vim I wish everyone happy with VIM.
Copyright © Windows knowledge All Rights Reserved