国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

How to replace selected lines or specify text within several lines in vim
曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新 2017-05-16 16:39:59
0
2
801

Checked the vim command list on the Internet, only the command to replace the current line with full text or replace with full text

曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新

reply all(2)
PHPzhong
:'<,'>s/替換項/替換為/g

The following command replaces all strings idiots with managers in this article:

:1,$s/idiots/manages/g

Usually we use % in the command to refer to the entire file as the replacement range:

:%s/search/replace/g

The following command specifies replacement only between lines 5 to 15:

:5,15s/dog/cat/g

The following command specifies replacement only between the current line and the end of the file:

:.,$s/dog/cat/g

The following command specifies replacement only within the next 9 lines:

:.,.+8s/dog/cat/g

You can also use specific characters as the replacement range. For example, replace all equal signs (=) in the SQL statement from FROM to the semicolon with inequality signs (<>):

:/FROM/,/;/s/=/<>/g

In visual mode, first select the replacement range, and then enter: to enter command mode, you can use the s command to replace text in the selected range.
- VIM study notes Substitute (may require Anti-GFW)

大家講道理

Control+v enters visual block mode, press hjkl to select the content to be operated, d means cut, p means paste

Oh, maybe I misunderstood the question. .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template