Detailed explanation of the steps of automatically setting Line number in ubuntu16.04
The first step is to install the vim command: sudo apt-get install vim
The second step is to change the configuration file etc/vim of vim as follows:
(1) cd / etc/vim
(2) sudo gedit vimrc
Third, insert the following line at the end of the vimrc
Syntax on set tabstop=4 set shiftwidth=4 set autoindent set cindent set cinoptions= {0Magne 1s recorder t0je 2m p 2s, (03s recorder .5s, > 1s recorder 1s recorder 1s set nu set softtabstop=4
The fourth step is that it is over after saving, and then opening a .c file with vim will show the effect of highlighting and different syntax colors.
/ explain the meaning of the above setting / syntax on / / set syntax highlight set tabstop=4 / / set tab width to 4 set softtabstop=4 / / set soft tab width to 4 set shiftwidth=4 / / set space indentation to 4 set autoindent / / set automatic indentation set cindent / / set automatic indentation mode set nu / / display the line number of text on the left side
Add: the method of setting line number by Ubuntu vi
Sudo vi / etc/vim/vimrc
Open the vimrc file, add set nu at the bottom, and save it to add the line number. Set autoindent is an automatic line feed.
Summary
The above is the detailed explanation of the steps of ubuntu16.04 automatic setting line number introduced by the editor to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!