当前位置:网站首页>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
边栏推荐
- Teamtalk source code analysis win client
- Go operation redis
- 线性dp求解 最长子序列 —— 小题三则
- [to be continued] [UE4 notes] l5ue4 model import
- 提示:SQL Server 阻止了对组件‘Ad Hoc Distributed Queries ‘的STATEMENT ‘OpenRowset/OpenDatasource“”
- 万物生长大会在杭召开,当贝入选2022中国未来独角兽TOP100榜单
- 自定义事件,全局事件总线,消息订阅与发布,$nextTick
- [deep learning] simple implementation of neural network forward propagation
- NLA natural language analysis realizes zero threshold of data analysis
- PHP linked list creation and traversal
猜你喜欢
Method of creating linked server for cross server data access
Stm32-dac Experiment & high frequency DAC output test
Tip: SQL Server blocked the state 'openrowset/opendatasource' of component 'ad hoc distributed queries'
[Hongke technology sharing] how to test DNS server: DNS performance and response time test
< 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
What is erdma? Popular science cartoon illustration
Quick analysis: easy to share the Internet
[to be continued] [UE4 notes] l5ue4 model import
没有从远程服务器‘‘映射到本地用户‘(null)/sa‘的远程用户‘sa‘及服务主密码解密错误的解决办法
How kaggle uses utility script
随机推荐
YOLOv3&YOLOv5输出结果说明
Word frequency statistics & sorting
快解析:轻松实现共享上网
一般来讲,如果频繁出现inconsistent tab and space的报错
Solving the longest subsequence with linear DP -- three questions
Fabric. JS zoom canvas
Federated Search: all requirements in search
Fabric. JS free drawing ellipse
Fabric.js 动态设置字号大小
STM32-DAC实验&高频DAC输出测试
C语言高级用法--函数指针:回调函数;转换表
Certik released the defi security report in 2021, disclosing key data of industry development (PDF download link attached)
Route (II)
2022家用投影仪首选!当贝F5强悍音画效果带来极致视听体验
Pycharm连接远程服务器
Uniapp automated test learning
3、函数指针和指针函数
每日学习3
Understanding of mongodb
Fabric.js 元素被选中时保持原有层级