当前位置:网站首页>1. Editing weapon VIM
1. Editing weapon VIM
2022-07-02 14:31:00 【Little BigUs】
VIM
vim There are edit mode and command mode , What you enter in edit mode is what , In command mode, specific functions can be achieved through specific keys .
Just entered vim It's command mode , Press... In command mode i( Insert... At the current cursor )、a( Insert... After the cursor )、o( Insert )
You can go into insert mode . Press... In insert mode ESC Exit insert mode and enter command mode .
In command mode :
:wpreservation:qsign out:wqSave and exit:q!Forced exit , Do not saveurevoke , This is very usefulCtrl + rCounter cancellation , This is also useful
The next thing is a little windy , It's about copying and pasting , It's also important. .
A lowercase letter v Enter single selection mode , That is, select one character by one , Capitalization V Enter the line Selected mode , That is, line by line selection , Select to copy , Press down y replicate , After copying Press p Paste .
You can also press yy Copy the current row , No need to check , Press nyy Copy the n That's ok .
yw Copy a word ,nyw Copy n Word .
shear :
Cut the selected part :d
Cut a line :dd
shear n That's ok :ndd
Cut a word 、 shear n Word …
Find a word : Slash / + The word to look for , The first qualified word in the file will be found and highlighted , Press enter , Position the cursor over the highlighted area . Press A lowercase letter n Will navigate to the next word , Capitalization N Go to the previous word .
If you want to replace all one word in the file with another word , The operation is as follows ::%s/ Replaced word / New words among %s Represents the meaning of the whole document , Indicates the replacement range . If you only want to replace some lines , For example, I want to replace n,m Words between , Then the % Switch to n,m Note that it must be lowercase s.
:800 Go straight to 800 That's ok
ctrl+d Page down
ctrl+u Page up
Capitalization G Go straight to the end of the file , Two lowercase g Navigate directly to the beginning of the file , Of course :1 The same effect .
21
13
边栏推荐
- 给Android程序员的一些面试建议「建议收藏」
- String matching problem
- Tujia muniao meituan has a discount match in summer. Will it be fragrant if the threshold is low?
- Multi rotor aircraft control using PID and LQR controllers
- Solving the longest subsequence with linear DP -- three questions
- Penetrate the remote connection database through the Intranet
- NLA natural language analysis realizes zero threshold of data analysis
- Some interview suggestions for Android programmers "suggestions collection"
- Fabric. Keep the original level when JS element is selected
- < schematic diagram of oral arithmetic exercise machine program development> oral arithmetic exercise machine / oral arithmetic treasure / children's math treasure / children's calculator LCD LCD driv
猜你喜欢

TeamTalk源码分析之win-client

Daily learning 3

MySQL 45 lecture - learning from the actual battle of geek time MySQL 45 Lecture Notes - 04 | easy to understand index (Part 1)

In 2021, the global styrene butadiene styrene (SBS) revenue was about $3722.7 million, and it is expected to reach $5679.6 million in 2028

A white hole formed by antineutrons produced by particle accelerators

Design of non main lamp: how to make intelligent lighting more "intelligent"?

Who is better, Qianyuan projection Xiaoming Q1 pro or Jimi new play? Which configuration is higher than haqu K1?

Certik released the defi security report in 2021, disclosing key data of industry development (PDF download link attached)

<口算练习机 方案开发原理图>口算练习机/口算宝/儿童数学宝/儿童计算器 LCD液晶显示驱动IC-VK1621B,提供技术支持

Qt新建项目
随机推荐
Fabric.js 上划线、中划线(删除线)、下划线
MySQL45讲——学习极客时间MySQL实战45讲笔记—— 04 | 深入浅出索引(上)
途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
Go operation redis
Convolutional neural network (Introduction)
TeamTalk源码分析之win-client
Dangbei projection 4K laser projection X3 Pro received unanimous praise: 10000 yuan projector preferred
Pychart connects to the remote server
Chinese science and technology from the Winter Olympics (III): the awakening and evolution of digital people
MySQL 45 lecture - learning the actual battle of MySQL in Geek time 45 Lecture Notes - 05 | easy to understand index (Part 2)
<口算練習機 方案開發原理圖>口算練習機/口算寶/兒童數學寶/兒童計算器 LCD液晶顯示驅動IC-VK1621B,提供技術支持
Fabric.js 自由绘制椭圆
QT new project
卷积神经网络(入门)
P1042 [noip2003 popularization group] Table Tennis
Penetrate the remote connection database through the Intranet
< schematic diagram of oral arithmetic exercise machine program development> oral arithmetic exercise machine / oral arithmetic treasure / children's math treasure / children's calculator LCD LCD driv
Multi rotor aircraft control using PID and LQR controllers
How kaggle uses utility script
The conference on the growth of all things was held in Hangzhou, and dangbei was selected into the top 100 list of future unicorns in China in 2022