VIM复合命令

VIM提供了很多 复合命令,可以把两个动作合并为一次按键。极大提高了编辑效率。以下是一些具体的例子:

|------|--------|-----------|
| 复合命令 | 等效的长命令 | 说明 |
| C | c | 删除光标到行尾 | | s | cl | 删除光标位置的字符 | | S | \^C | 删除整行 | | I | \^i | 光标移动到行首 | | A | a | 光标移动到行尾 |
| o | A + 回车 | 光标下方开启一行 |
| O | ko | 光标上方开启一行 |

除了表中说明的功能之外,这些命令还有一个共同特点:它们都会从普通模式切换到插入模式。结合重复命令.将产生奇特的反应。

假设文本内容:

复制代码
Maximum length of a custom vocabulary phrase    Each supported Region: 256  No  The maximum number of characters in a custom vocabulary phrase.
Number of StartMedicalStreamTranscription Websocket requests    Each supported Region: 25   Yes The maximum number of StartMedicalStreamTranscription Websocket requests.                                                                                                  
Number of StartMedicalStreamTranscription Websocket requests    Each supported Region: 25   Yes The maximum number of StartMedicalStreamTranscription Websocket requests.
Number of StartStreamTranscription Websocket requests   Each supported Region: 25   Yes The maximum number of StartStreamTranscription Websocket requests that you can make per second from this account in the current Region.
Number of concurrent HTTP/2 streams for streaming transcription.    Each supported Region: 25   Yes The maximum number of concurrent stream transcription jobs in this account in the current Region
Number of concurrent batch transcription jobs   Each supported Region: 250  Yes The maximum number of concurrent transcription jobs in this account in the current Region
Number of concurrent medical batch transcription jobs   Each supported Region: 250  Yes The maximum number of concurrent medical batch transcription jobs.
Number of concurrent medical batch transcription jobs   Each supported Region: 250  Yes The maximum number of concurrent medical batch transcription jobs.

现在要隔行在 Number 之前加上The,用列编辑不适用,就可以用组合指令加.来简化操作:

  1. 光标移动到第二行任意位置
  2. 执行命令I ,这时光标移到行首并转为编辑模式
  3. 输入 The ,并按Esc
  4. 重复执行jj.
相关推荐
春日见1 分钟前
如何跑通,吃透一个开源项目?
linux·运维·开发语言·数码相机·matlab
morn_venus16 分钟前
Vim查看日志技巧
vim
用户61354114601620 分钟前
【麒麟Kylin】cmake-3.16.5 rpm包安装步骤详解 附常见问题
linux
AAA_bo121 分钟前
liunx安装canda、python、nodejs、git,随后部署私有网页内容提取工具--JinaReader全攻略
linux·python·ubuntu·typescript·aigc·python3.11·jina
代码游侠36 分钟前
学习笔记——Linux进程间通信(IPC)
linux·运维·笔记·学习·算法
郝学胜-神的一滴37 分钟前
Linux C++ 守护进程开发指南
linux·运维·服务器·开发语言·c++·程序人生·性能优化
李斯维42 分钟前
第18章 过滤器:统计和格式化
linux·bash·unix
DeeplyMind1 小时前
ROCm rocr-libhsakmt性能跟踪与分析系列10-5:跟踪启动、数据采集与停止
linux·驱动开发
jerryinwuhan1 小时前
linux_1219_1
linux
@小博的博客1 小时前
Linux的工具第一篇:vim编辑器的使用详解
linux·编辑器·vim