当前位置:网站首页>VIM basic operation summary
VIM basic operation summary
2022-07-25 13:18:00 【Just stay at home】
vim yes linux The next file editor , This article will focus on Summary Operation in normal mode and conversion between modes .
Catalog
One . Mode conversion and exit
Two . In normal mode vim Operation and split screen switching
( One ). In normal mode vim operation
( Two ). Split screen switching
One . Mode conversion and exit
( One ). Mode conversion
By default ,vim The editor is in normal mode (normal)

vim There are five basic patterns : Common mode 、 Insertion mode (insert)、 Replace mode (replace)、 Command mode (command)、 Visual Modes (visual).
The replacement is as follows :
| Ordinary -> Insert | i |
| Ordinary -> Replace | R |
| Ordinary -> command | : |
| Ordinary -> visual | v |
| Other modes -> Ordinary | Esc |
It is worth noting that , If we want to switch between two non ordinary modes , You need to switch to normal mode first and then switch accordingly .
You can use the following table to make a summary :

( Two ). sign out
Exit time , We will use command mode , In command mode :
| w | preservation | wq | Save and exit |
| q | sign out | w! | Force save |
| ! | mandatory | q! | Forced exit |

Press enter to exit .
Two . In normal mode vim Operation and split screen switching
( One ). In normal mode vim operation
In normal mode , We do not need to use the Enter key to carry out the command operation .
Be careful : The following can be omitted n, nothing n Everyone thinks 1.
| n yy | Copy from the cursor n That's ok . |
| n p | Paste from the next line under the cursor n Time . |
| n u | revoke n Secondary historical operation . |
| n ctrl r / ctrl R | Undo just now u operation . |
| n G | Position the cursor on the... Page n That's ok , nothing n Then set to the last line |
| n gg | Position the cursor on the... Page n That's ok , nothing n Then set to the first line |
| n w | The cursor moves to the right in units of words n individual . |
| n b | The cursor moves left in units of words n individual . |
| n $ / shift 4 | Count this line and move the cursor down 4 That's ok . nothing n The cursor moves to the rightmost column of the line |
| ^ / shift 6 | The cursor moves to the leftmost column of the line |
| n dd | take n Cut , It can also be deleted . |
| n r | Replace n Characters ( take n Replace characters with the same ). |
| n x | Delete n Characters ( From left to right ). |
| n X | Delete n Characters ( right to left ). |
| n ~ / shift ` | Raise the cursor n Character case conversion . |
( Two ). Split screen switching
Split screen switching needs to be carried out in command mode .
Vertical split screen :vs file
Horizontal split screen :sp file
Switch split screen :ctrl ww
vim Proceed under linux Command operation :! Instructions
Exit split screen :exit ( At this time, the file in which the cursor is located will exit )
- “ Fools are confused , Wise men ask questions .”—— Benjamin · Disraeli (Benjamin Disraeli)
If there is a mistake , Please correct
边栏推荐
- Masscode is an excellent open source code fragment manager
- yum和vim须掌握的常用操作
- OAuth,JWT ,OIDC你们搞得我好乱啊
- Emqx cloud update: more parameters are added to log analysis, which makes monitoring, operation and maintenance easier
- [review SSM framework series] 15 - Summary of SSM series blog posts [SSM kill]
- massCode 一款优秀的开源代码片段管理器
- 好友让我看这段代码
- [machine learning] experimental notes - emotion recognition
- Shell常用脚本:获取网卡IP地址
- In order to improve efficiency, there are various problems when using parallelstream
猜你喜欢
![[300 opencv routines] 239. accurate positioning of Harris corner detection (cornersubpix)](/img/a6/c45a504722f5fd6e3c9fb8e51c6bb5.png)
[300 opencv routines] 239. accurate positioning of Harris corner detection (cornersubpix)

Error: cannot find or load main class XXXX

cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘

Docker learning - redis cluster -3 master and 3 slave - capacity expansion - capacity reduction building
详解浮点数的精度问题
![[six articles talk about scalablegnn] around www 2022 best paper PASCA](/img/ac/150f6397724593a30aab2805ba5084.png)
[six articles talk about scalablegnn] around www 2022 best paper PASCA

【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)

Atcoder beginer contest 261 f / / tree array

【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)

程序员成长第二十七篇:如何评估需求优先级?
随机推荐
Shell常用脚本:检测某域名、IP地址是否通
Introduction and features of numpy (I)
Zero basic learning canoe panel (16) -- clock control/panel control/start stop control/tab control
Convolutional neural network model -- vgg-16 network structure and code implementation
Convolutional neural network model -- alexnet network structure and code implementation
VIM tip: always show line numbers
ThreadLocal&Fork/Join
工业互联网的内涵及其应用
How to realize the configuration method of user password free login?
0717RHCSA
Azure Devops(十四) 使用Azure的私有Nuget仓库
卷积神经网络模型之——VGG-16网络结构与代码实现
【CTR】《Towards Universal Sequence Representation Learning for Recommender Systems》 (KDD‘22)
备战2022 CSP-J1 2022 CSP-S1 初赛 视频集
How to use causal inference and experiments to drive user growth| July 28 tf67
Shell常用脚本:获取网卡IP地址
网络空间安全 渗透攻防9(PKI)
Zero basic learning canoe panel (15) -- CAPL output view
Django 2 ----- 数据库与Admin
OAuth,JWT ,OIDC你们搞得我好乱啊