当前位置:网站首页>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
边栏推荐
- P1042 [noip2003 popularization group] Table Tennis
- c# 水晶报表打印
- STM32库函数进行GPIO初始化
- How many knowledge points can a callable interface have?
- HMS core machine learning service helps zaful users to shop conveniently
- < schéma de développement de la machine d'exercice oral > machine d'exercice oral / trésor d'exercice oral / trésor de mathématiques pour enfants / lecteur LCD de calculatrice pour enfants IC - vk1621
- String matching problem
- Tip: SQL Server blocked the state 'openrowset/opendatasource' of component 'ad hoc distributed queries'
- Custom events, global event bus, message subscription and publishing, $nexttick
- Fabric. Keep the original level when JS element is selected
猜你喜欢

Qt新建项目

HMS core machine learning service helps zaful users to shop conveniently

抓包工具fiddler学习

什么是 eRDMA?丨科普漫画图解

Fabric.js 缩放画布

2022家用投影仪首选!当贝F5强悍音画效果带来极致视听体验

每日学习2

你知道Oracle的数据文件大小有上限么?

万物生长大会在杭召开,当贝入选2022中国未来独角兽TOP100榜单
![[Hongke technology sharing] how to test DNS server: DNS performance and response time test](/img/f4/d8c21d6c33985fd6d819cd44c22c72.png)
[Hongke technology sharing] how to test DNS server: DNS performance and response time test
随机推荐
Start to write a small demo - three piece chess
每天坚持20分钟go的基础二
Essential elements of science fiction 3D scenes - City
Yyds dry goods inventory software encryption lock function
字符串匹配问题
MySQL45讲——学习极客时间MySQL实战45讲笔记—— 04 | 深入浅出索引(上)
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
软件测试的方法
万物生长大会在杭召开,当贝入选2022中国未来独角兽TOP100榜单
Who is better, Qianyuan projection Xiaoming Q1 pro or Jimi new play? Which configuration is higher than haqu K1?
Fabric. Keep the original level when JS element is selected
Adhere to the foundation of 20 minutes go every day II
PTA题库 ===>复数四则运算,一帮一,考试座位号(7-73)
Pychart connects to the remote server
联合搜索:搜索中的所有需求
[Hongke technology sharing] how to test DNS server: DNS performance and response time test
Fabric. JS zoom canvas
线性dp求解 最长子序列 —— 小题三则
Daily learning 2
Multi rotor aircraft control using PID and LQR controllers