当前位置:网站首页>Vim详解
Vim详解
2022-07-17 10:38:00 【ChampionDragon】
vim快速定位到某一行的几种方法和显示行号,定位匹配字符串,显示当前行信息的命令
1.命令模式下(没有输入i进行编辑前),:n 比如想到第65行,输入 ":65" 按回车即可定位到65行。
2.命令模式下(没有输入i进行编辑前),ngg 比如想到第86行,输入 "86gg" 或"86G" (这个不用按回车就直接定位到对应行了)
3.打开文件定位到指定行 vim filename +n 比如想到第65行,输入 vim filename +65 或者 vim +65 filename
快速匹配字符串:
vim +/pattern filename:打开文件,并将光标置于第一个与pattern匹配的字符串处
比如想到定位到第一个与"hello"匹配的行,输入 vim +/hello filename
显示行号的方法:输入set number或者set nu,取消显示输入set nonu
查看当前行信息,命令模式下(没有输入i进行编辑前),同时按键:ctrl+g
在底部显示类似信息:"mytest.txt" 3 lines --100%-- 显示的是当前位置的行号和占整个文件的百分比。
边栏推荐
- AnyControl Demo演示
- DuiLib 实现tooltip自定义鼠标提示窗口
- ArrayList底层分析
- Vector容器的系列操作( 详解 )
- The inflection point of eth may be just around the corner, which is how to
- 组件化高级--插槽
- [C language] void type and void* pointer type
- MySQL -- SQL optimization case -- implicit character encoding conversion
- C language compilation process
- 【性能优化方法论系列】六、总结
猜你喜欢
Detailed explanation of C51 common data types
第十一章 STL 之 queue
Detailed explanation of the different usage of PIP and PIP3
SAP Fiori 的附件处理(Attachment handling)
Utility series - xshell installation, download and use
MySQL -- SQL optimization case -- implicit character encoding conversion
[C language] storage of floating-point type in memory
Part I - Fundamentals of C language_ 6. Function
Uniapp warehouse management system source code
The study found that DNA nano device injection can be safely used for medical purposes
随机推荐
cookie和session在实际项目中的使用
Add - before the command in makefile to ignore the error caused by the command and continue to execute the next command
el-table 列拖拽(无须引入其他插件)
面試題-給::memcpy函數設計測試用例
OLED displays how to understand the character sizes of 12*6, 16*8, 24*12, etc
Chapter IX deque of STL
MySQL user management
第一部分—C语言基础篇_4. 程序流程结构
目标检测模型大小计算,模型复杂度(参数换算公式)
第十三章 STL 之 set/ multiset
Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS) (found suitable exact version “11.4“)
中国十大国民小吃,第一居然是它
Utility series - xshell installation, download and use
【摸鱼神器】UI库秒变低代码工具——表单篇(二)子控件
研究发现DNA纳米设备注射液可安全用于医疗用途
组件化高级--插槽
Makefile中在命令前加上- 则忽略该命令产生的错误,继续执行下一条命令
多租户 SaaS 的数据库设计模式,你学废了吗?
面试题-给::memcpy函数设计测试用例
MySQL -- SQL optimization case -- implicit character encoding conversion