当前位置:网站首页>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 :
:w
preservation:q
sign out:wq
Save and exit:q!
Forced exit , Do not saveu
revoke , This is very usefulCtrl + r
Counter 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 普及组] 乒乓球
- Fabric.js 动态设置字号大小
- MySQL45讲——学习极客时间MySQL实战45讲笔记—— 04 | 深入浅出索引(上)
- 给Android程序员的一些面试建议「建议收藏」
- 一般来讲,如果频繁出现inconsistent tab and space的报错
- Penetrate the remote connection database through the Intranet
- uniapp自动化测试学习
- 你知道Oracle的数据文件大小有上限么?
- 提示:SQL Server 阻止了对组件‘Ad Hoc Distributed Queries ‘的STATEMENT ‘OpenRowset/OpenDatasource“”
- OpenHarmony笔记-----------(四)
猜你喜欢
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
千元投影小明Q1 Pro和极米NEW Play谁更好?和哈趣K1比哪款配置更高?
There is no solution to the decryption error of the remote user 'sa' and the service master password mapped from the remote server 'to the local user' (null) /sa '
Launcher startup process
Chinese science and technology from the Winter Olympics (III): the awakening and evolution of digital people
2022家用投影仪首选!当贝F5强悍音画效果带来极致视听体验
C crystal report printing
Yyds dry goods inventory software encryption lock function
Teamtalk source code analysis win client
每日学习3
随机推荐
检查密码
Tujia muniao meituan has a discount match in summer. Will it be fragrant if the threshold is low?
Route (II)
Golang 快速生成数据库表的 model 和 queryset
Yyds dry goods inventory software encryption lock function
Method of creating linked server for cross server data access
字符串匹配问题
In 2021, the global TCB adapter revenue was about $93 million, and it is expected to reach $315.5 million in 2028
Using computed in uni app solves the abnormal display of data () value in tab switching
Penetrate the remote connection database through the Intranet
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
P1042 [noip2003 popularization group] Table Tennis
Some interview suggestions for Android programmers "suggestions collection"
How many knowledge points can a callable interface have?
途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
Fabric. JS dynamically set font size
万物生长大会在杭召开,当贝入选2022中国未来独角兽TOP100榜单
自定义事件,全局事件总线,消息订阅与发布,$nextTick
Fabric.js 缩放画布
php链表创建和遍历