Mac os / linux vi/vim permanent display line number turns on highlight mode
Temporary display:
Enter the vi editor and enter the command
: set number / / the line number cannot be displayed next time when entering vi
: set nonumber / / this time vi closes line number display
Vi is recommended to use the command after each modification:
Source / .bash_profile
Permanent mode:
Step 1:
Cp / usr/share/vim/vimrc ~ / .vimrc
First copy a vim configuration template to the personal directory
Note: change redhat to cp / etc/vimrc ~ / .vimrc
Step 2:
Vi / .vimrc
Enter insert mode and add two lines at the end
Syntax on
Set nu!
Save and exit and go to vi to see the effect.
Isn't it very cool!
Today's recommended reading articles are recommended
JMeter database operation
Jmeter Interface Test-regular expression
JMeter returns garbled code in Chinese
Jmeter interface testing-parameterization
JMeter Interface testing-Basics
Test-impression
Add Wechat to the consulting work
scan a QR code
Welcome self-recommendation and recommendation, need Wechat to push resume!
Please poke the QR code below to learn more.