[Linux] VIM common commands

Time:2020-2-27

By logm

This article was originally published at https://segmentfault.com/u/logm/articles and is not allowed to be reproduced~

: set Nu "display line number (or: set number)
: set nonu "turn off line number (or: set nonumber)
: set IC "ignore case (: set ignorecase)
: set noic "case sensitive (: set noignorecase)

: set list "display invisible symbols (line breaks, etc.)

: 3,7s / A / B / g "replace a in lines 3 to 7 with B
: 3, + 2S / A / B / g "replace a in line 3 and 2 below with B
/Name \ C "finds name and is not case sensitive

The image below is reprinted. The original author can see the watermark. The source is not found.

The orange part of the picture is the error of the original picture. I have corrected it.

[Linux] VIM common commands

Recommended Today

CentOS install Chinese Fonts

preface When we encounter some Chinese display garbled problems, it may be because the server does not install Chinese fonts install 1. View system fontsBefore starting the installation, we first check the installed fonts in the system. To view the installed fonts in the system, we can use thefc-listIf there is no command in the […]