当前位置:网站首页>VIM编辑器常用指令
VIM编辑器常用指令
2022-06-30 00:53:00 【Lzg_na】
跳转到指定行:
1. 88G (命令模式)
2. :88 (末行模式)
跳转文件首:
gg (命令模式)
跳转文件尾:
G(命令模式)
自动格式化程序:
gg=G(命令模式)
大括号对应:
% (命令模式)
光标移至行首:
0 (命令模式)执行结束,工作模式不变。
光标移至行尾:
$ (命令模式)执行结束,工作模式不变。
删除单个字符:
x (命令模式)执行结束,工作模式不变。
替换单个字符:
将待替换的字符用光标选中, r (命令模式),再按欲替换的字符
删除一个单词:
dw(命令模式)光标置于单词的首字母进行操作。
删除光标至行尾:
D 或者 d$(命令模式)
删除光标至行首:
d0 (命令模式)
删除指定区域:
按 V (命令模式)切换为 “可视模式”,使用 hjkl挪移光标来选中待删除区域。 按 d 删除该区域数据。
删除指定1行:
在光标所在行,按 dd (命令模式)
删除指定N行:
在光标所待删除首行,按 Ndd (命令模式)
复制一行:
yy
粘贴:
p:向后、P:向前。
查找:
1. 找 设想 内容:
命令模式下, 按 “/” 输入欲搜索关键字,回车。使用 n 检索下一个。
2. 找 看到的内容:
命令模式下,将光标置于单词任意一个字符上,按 “*”/ “#”
单行替换:
将光标置于待替换行上, 进入末行模式,输入 :s /原数据/新数据
通篇替换:
末行模式, :%s /原数据/新数据/g g:不加,只替换每行首个。 sed
指定行的替换:
末行模式, :起始行号,终止行号s /原数据/新数据/g g:不加,只替换每行首个。
:29,35s /printf/println/g
撤销、反撤销:
u、ctrl+r(命令模式)
分屏:
sp:横屏分。 Ctrl+ww 切换。
vsp:竖屏分。Ctrl+ww 切换。
跳转至 man 手册:
将光标置于待查看函数单词上,使用 K(命令模式)跳转。 指定卷, nK
查看宏定义:
将光标置于待查看宏定义单词上,使用 [d 查看定义语句。
在末行模式执行shell命令:
:!命令 :! ls -l
边栏推荐
- Developers, why does the maturity of container technology herald the arrival of cloud native era?
- Which direction of network development is better? Data communication engineer learning path sharing
- Simple pages
- Which securities company is better and which platform is safer for stock speculation account opening
- Ml: introduction to confidence interval (the difference and relationship between precision / accuracy / accuracy), use method, and detailed introduction to case application
- Crmeb SMS for program configuration of knowledge payment system
- [cloud native] kernel security in container scenario
- 解决choice金融终端Excel/Wps插件修复visual basic异常
- [programming problem] maze problem
- What are the top ten securities companies? In addition, is it safe to open a mobile account?
猜你喜欢

2022年最新最详细IDEA关联数据库方式、在IDEA中进行数据库的可视化操作(包含图解过程)

Which direction of network development is better? Data communication engineer learning path sharing

Comment personnaliser les modèles et générer rapidement le code complet dans l'idée?

面试官:大量请求 Redis 不存在的数据,从而影响数据库,该如何解决?
![[qnx hypervisor 2.2 user manual]6.2.2 communication between guest and host](/img/a4/a84f916d3aa2cc59f5b686cd32797a.png)
[qnx hypervisor 2.2 user manual]6.2.2 communication between guest and host

Clean, talk, bring children, and get rid of the label of "artificial mental retardation" for the sweeper

Yunna | how to use the system to manage fixed assets? How to manage fixed assets?

xshell中怎么切换到root用户

利用huggingface进行文本分类

MySQL deadlock
随机推荐
Using tsne to visualize the similarity of different sentences
玉米地里的小鸟
阿洛觉得自己迷茫
Clean, talk, bring children, and get rid of the label of "artificial mental retardation" for the sweeper
Online text digit recognition list summation tool
If the amount exceeds 6 digits after the decimal point, only 6 digits will be reserved, and if it is less than 6 digits, it will remain the same - Basic accumulation
Text classification using huggingface
Visual Studio 2017 无法打开包括文件: “QOpenGLFunctions_3_3_Core”: No such file or directory
Which securities company is better and which platform is safer for stock speculation account opening
数据中台咋就从“小甜甜”变成了“牛夫人”?
[Simulation Proteus] détection de port 8 bits 8 touches indépendantes
How to design test cases
[UML] several relationships of UML (dependency Association aggregation composition inheritance Implementation)
Byte, word, doubleword relationship
Some thoughts on life
php微信商家转账到零钱 发起商家转账API
The SQL statement concat cannot find the result
After the element uses align items center and overflow auto, some contents are not fully displayed
Top performance version 2 reading notes (IV) -- memory monitoring
Visual studio 2017 cannot open the include file: 'qopenglfunctions_3_3_core': no such file or directory