In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "Linux vim find and replace operation", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Linux vim find and replace operation" bar!
Find
/ csdn looks down for a string named csdn
? Csdn looks up a string named csdn
N n is the letter of the English alphabet, which means to continue to find the operation of the previous search (used in conjunction with the above operation)
N N is the letter of the English alphabet, which means to continue to find the operation of the previous search up (in conjunction with the above operation)
When ignoring case lookups, add\ c after the string you want to find, as follows
/ csdn\ c
Replace
The code is as follows:
: n1,n2s/word1/word2/g
N1 and N2 are numbers. Means to query word1 between the N1 and N2 lines and replace the string with word2.
For example:
The code is as follows:
: 10,20s/csdn/good/g
Between 10 and 20 lines, replace the csdn string with good
The code is as follows:
: 1 language, word 1, word 2, etc. G
From the ground line 1 to the last line, replace word1 with word2
The code is as follows:
: 1 language words, word 1, word 2, etc. GC
From the ground line 1 to the last line, replace word1 with word2, and will be prompted whether to replace it before replacement
Note: both find and replace are performed in non-editing mode
Thank you for your reading, the above is the content of "Linux vim search and replacement operation", after the study of this article, I believe you have a deeper understanding of the problem of Linux vim search and replacement operation, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.