当前位置:网站首页>vim常用命令
vim常用命令
2022-08-09 13:05:00 【zhouyongku】
以下n代表输入的数字
1.跳转到指定行
:n
例如跳转到15行
:15
2.删除某一行
:n d
3.删除光标行
dd
4.删除多行
:n1,n2 d
例如删除2到15行
:2,15 d
5.拷贝光标行
y
6.移动多行
:n1,n2 move n3
例如,将5到8行移动插入到12行
:5,8 move 12
7.注释多行
ctrl+v进入视图模式,按住k或者j进行选择,选择完成后输入shift+i,进入插入模式,输入注释内容,例如#或者//,输入完毕后按住esc,最后ctrl+v进入命令行模式,即可将所有选中行插入#或者//
8.保存
:w
9.退出
:q
10.强制退出
:q!
11.强制保存
:w!
12.到文件头
gg
13.到文件尾
shift+g
14.到行首
0
15.到行尾
$
16.替换和全替换
把第一个a替换程b
/s/a/b
把所有的a替换成b
%s/a/b
17.取消操作
:u取消上一次操作
:U取消所有操作
18.上一行/下一行
上一行:k
下一行:j
19.左右移动
左:h
右:l
20.十六进制查看文件
vim -b 文件名
:%!xxd -g 1
查找例如:ff d0
/ff d0
边栏推荐
- Standing wave ratio calculation method
- Dry+Bean+Dataset R语言数据分析,报告英文
- Unity3d_API_GPS_LocationService
- GIN初探,环境安装
- 蓝桥杯线上模拟赛——Flex 经典骰子布局
- Professor Chen Qiang's "Machine Learning and R Application" course Chapter 14 Assignment
- Time series analysis course lab report
- 绘制混合密度函数图以及添加分位数线
- Sandbox中的进程/线程相关-1
- Explanation of RTSP protocol
猜你喜欢

5G China unicom repeater network management protocol real-time requirements
![[MRCTF2020]套娃-1](/img/cb/ba780a4929acd9d76f77ab269faff6.png)
[MRCTF2020]套娃-1

render解析

面试攻略系列(二)-- 秒杀系统

5G China unicom general exception handling

How to solve the 0x80070005 error when the computer is reinstalled and the system is restored

5G China unicom 一般性异常处理

5G China unicom 直放站 网管协议 实时性要求

蓝桥杯线上模拟赛——Flex 经典骰子布局

GIN Bind mode to get parameters and form validation
随机推荐
Q_08 更多信息
Standing wave ratio calculation method
JZ7 重建二叉树
NC192 二叉树的后序遍历
puzzle(016.5)逻辑电路
Draw a histogram with plot_hist_numeric()
Oracle Recovery Tools修复空闲坏块
2.微服务'黑话'集锦及Eureka注册中心相关概念
蓝桥杯线上模拟赛——Flex 经典骰子布局
万物皆可柯里化的 Ramda.js
render解析
微服务+微信小程序实现社区服务
FFmpeg multimedia file processing (FFMPEG logging system)
telnet+ftp 对设备进行 操控 和 升级
Ledong Fire Rescue Brigade was invited to carry out fire safety training for cadres
陈强教授《机器学习及R应用》课程 第十五章作业
Explanation of RTSP protocol
Professor Chen Qiang's "Machine Learning and R Application" course Chapter 16 Assignment
jenkins api create custom pipeline
记录本项目中用到的系统调用与C库函数-2