当前位置:网站首页>Common shortcuts to VIM editor
Common shortcuts to VIM editor
2022-07-24 11:57:00 【Abstinence Li Bai -lisage】
I'm studying these days shell Programming , Which is often used Linux Under the vim compiler , Today, I will summarize some in vim Shortcuts commonly used in editors , It's convenient for us to use it better .
Catalog
One 、vi Basic concepts of editor
One 、vi Basic concepts of editor
vi The editor is Linux Powerful text editor , There are three modes : choice ( Default ) Pattern 、 Edit mode 、 Command line mode
Two 、 Mode switch
- From the selection mode Switch Go to edit mode : Press i key ( Insert edit at the current cursor position )
- From edit mode Switch To Choice mode : ESC key
- From the selection mode Switch To Command line mode : Shift + :
3、 ... and 、 Edit mode
- Press i Insert ,
- Press o Insert a new line under the current line- Press O(shift + o) Insert a line above the current line
- Press I(shift+i) Move the cursor to the beginning of the current line
- Press A(shift+a) Move the cursor to the end of the current line
- Press u Undo the previous action
- Press ctrl+r Cancel undo
- Press x Delete the character of the current cursor
- Press dd Delete current row ( The effect of cutting and pasting , That is to say dd Then press p To paste ).
- By number +dd Start from the line where the current cursor is located , Delete n That's ok . 4dd Indicates that the current line starts to be deleted downward 4 Go ahead .
- Press nyy Copy from the current cursor n That's ok
- Press p Start pasting below the line where the current cursor is located ( Previously copied content )
- Press gg Enter the first character position on the first line
- Press Shift+g Enter the first character position of the last line
- Press gg d G Empty file contents
Four 、 Command line mode
- / The content of the query
- set number According to the line Numbers
- Line number Jump to the beginning of the specified line number- w write in , Do not exit
- q sign out , Provided that the file has not been modified ( The normal exit )
- q! Forced exit , Do not save
- %s/ What to look for / What to replace /g Find and replace all
5、 ... and 、 Conclusion
There is no need to remember these commands , It is in the process of using that we can remember that there are some shortcut keys that are convenient for us to use , Just come back and find it , Welcome to collect .
边栏推荐
- C # entry series (29) -- preprocessing commands
- L2-011 玩转二叉树
- 【我也想刷穿 LeetCode啊】468. 验证IP地址
- Agile? DevOps ?
- 哈希——349. 两个数组的交集
- Operational amplifier - Notes on rapid recovery [II] (application)
- Basic syntax of MySQL DDL and DML and DQL
- NFT digital collection system construction - app development
- 一周精彩内容分享(第13期)
- Skillfully using command line parameters in Delphi to realize the trigger function of dragging files onto program icons
猜你喜欢

链表——剑指offer面试题 02.07. 链表相交

Dynamic memory management

HCIP OSPF接口网络类型实验 第四天

String -- 344. Reverse string
![Detailed OSPF configuration of layer 3 switch / router [Huawei ENSP experiment]](/img/a9/f080940ec7bf94ab83c922990efa62.png)
Detailed OSPF configuration of layer 3 switch / router [Huawei ENSP experiment]

How to use a third party without obtaining root permission topic: MIUI chapter

Types and history of bugs in it circle

3、 Implementation principle of MFC message mapping mechanism

Convergence rules for 4 * 4 image weights

1184. Distance between bus stops: simple simulation problem
随机推荐
容错、熔断的使用与扩展
makefile快速使用
哈希——18. 四数之和
链表——剑指offer面试题 02.07. 链表相交
1184. 公交站间的距离 : 简单模拟题
CCF 1-2 question answering record (2)
Day3: branch structure
三、MFC消息映射机制实现原理
HCIP OSPF接口网络类型实验 第四天
Jackson parsing JSON detailed tutorial
HCIP MGRE实验 第三天
Linked list - Sword finger offer interview question 02.07. linked list intersection
Remember to optimize my personal blog once
哈希——15. 三数之和
L1-064 估值一亿的AI核心代码
Hash - 15. Sum of three numbers
Import the data in MariaDB into columnstore
在kuborad图形化界面中,操作Kubernetes 集群,实现mysql中的主从复制
JVM visualvm: multi hop fault handling tool
A*与JPS