Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Mac os / linux vi/vim permanent display line number turns on highlight mode

Shulou Source: shulou.com Published: 2022-06-03 04:56:46 11月16日 Update

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.

Tags: Recommendations tests interfaces line numbers commands steps 2D QR codes patterns permanent personal garbled parameters foundations impressions effects data databases articles article selection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB Redmi Apple NVidia