vscode vim 快捷键汇总
需满足操作:
- 上下移动
- 按照 word 移动
- 选中增删改
- 查找字符/变量
- 移动、增加、复制、删除 行
- 选中多个相同的变量/字符
- 屏幕移动
- 增加多个光标
- 快速注释
上下左右移动
| Command | Description |
|---|---|
| 🔢 h | left (also: CTRL-H, BS, or Left key) |
| 🔢 l | right (also: Space or Right key) |
| 0 | to first character in the line (also: Home key) |
| ^ | to first non-blank character in the line |
| 🔢 $ | to the last character in the line (N-1 lines lower) (also: End key) |
| gm | to middle of the screen line |
| 🔢 | | to column N (default: 1) |
| 🔢 f{char} | to the Nth occurrence of {char} to the right |
| 🔢 k | up N lines (also: CTRL-P and Up) |
| 🔢 j | down N lines (also: CTRL-J, CTRL-N, NL, and Down) |
| 🔢 - | up N lines, on the first non-blank character |
| 🔢 + | down N lines, on the first non-blank character (also: CTRL-M and CR) |
| 🔢 _ | down N-1 lines, on the first non-blank character |
| 🔢 G | goto line N (default: last line), on the first non-blank character |
| 🔢 gg | goto line N (default: first line), on the first non-blank character |
按照word移动
| Command | Description |
|---|---|
| 🔢 w | N words forward |
| 🔢 W | N blank-separated WORDs forward |
| 🔢 e | N words forward to the end of the Nth word |
| 🔢 E | N words forward to the end of the Nth blank-separated WORD |
| 🔢 b | N words backward |
| 🔢 B | N blank-separated WORDs backward |
| 🔢 ) | N sentences forward |
| 🔢 ( | N sentences backward |
| 🔢 } | N paragraphs forward |
| 🔢 { | N paragraphs backward |
选中增删改
进入 insert mode 后就和之前的模式一样,快捷键有些是和原理的 vscode 一致,有些不一致。
visual mode
| Command | Description |
|---|---|
| v | start highlighting characters or stop highlighting |
| V | start highlighting linewise or stop highlighting |
| CTRL-V | start highlighting blockwise or stop highlighting |
| o | exchange cursor position with start of highlighting |
删除
| Command | Description |
|---|---|
| 🔢 x | delete N characters under and after the cursor |
| 🔢 Del | delete N characters under and after the cursor |
| 🔢 X | delete N characters before the cursor |
| 🔢 d{motion} | delete the text that is moved over with {motion} |
| {visual}d | delete the highlighted text |
| 🔢 dd | delete N lines |
| 🔢 D | delete to the end of the line (and N-1 more lines) |
| (change = delete text and enter Insert mode) | |
| 🔢 c{motion} | change the text that is moved over with {motion} |
| {visual}c | change the highlighted text |
| 🔢 cc | change N lines |
| 🔢 S | change N lines |
| 🔢 C | change to the end of the line (and N-1 more lines) |
| 🔢 s | hhchange N characters |
复制
| Command | Description |
|---|---|
| "{char} | use register {char} for the next delete, yank, or put |
| "* | use register * to access system clipboard |
| :reg | show the contents of all registers |
| :reg | {arg} show the contents of registers mentioned in {arg} |
| 🔢 y{motion} | yank the text moved over with {motion} into a register |
| {visual}y | yank the highlighted text into a register |
| 🔢 yy | yank N lines into a register |
| 🔢 Y | yank N lines into a register |
| 🔢 p | put a register after the cursor position (N times) |
| 🔢 P | put a register before the cursor position (N times) |
| 🔢 ]p | like p, but adjust indent to current line |
| 🔢 [p | like P, but adjust indent to current line |
| 🔢 gp | like p, but leave cursor after the new text |
| 🔢 gP | like P, but leave cursor after the new text |
增加
| Command | Description |
|---|---|
| 🔢 a | append text after the cursor (N times) |
| 🔢 A | append text at the end of the line (N times) |
| 🔢 i | insert text before the cursor (N times) (also: Insert) |
| 🔢 I | insert text before the first non-blank in the line (N times) |
| 🔢 gI | insert text in column 1 (N times) |
| gi | insert at the end of the last change |
| 🔢 o | open a new line below the current line, append text (N times) |
| 🔢 O | open a new line above the current line, append text (N times) |
查找字符/变量
| Command | Description |
|---|---|
| 🔢 /{pattern}[/[offset]] | search forward for the Nth occurrence of {pattern} Currently we only support JavaScript Regex but not Vim’s in-house Regex engine. |
| 🔢 ?{pattern}[?[offset]] | search backward for the Nth occurrence of {pattern} Currently we only support JavaScript Regex but not Vim’s in-house Regex engine. |
| 🔢 / | repeat last search, in the forward direction {count} is not supported. |
| 🔢 ? | repeat last search, in the backward direction {count} is not supported. |
| 🔢 n | repeat last search |
| 🔢 N | repeat last search, in opposite direction |
移动、增加、复制、删除 行
复制行
insert mode
alt + shift up/down
删除行
dd
移动行
insert mode
alt + up/down
选中多个相同的变量/字符
CRTL +D选中目标
shift +a/i 防止 curcor 即可编辑全部目标
屏幕移动
| Command | Description |
|---|---|
| 🔢 CTRL-E | window N lines downwards (default: 1) |
| 🔢 CTRL-D | window N lines Downwards (default: 1/2 window) |
| 🔢 CTRL-Y | window N lines upwards (default: 1) |
| 🔢 CTRL-U | window N lines Upwards (default: 1/2 window) |
增加多个光标
in Visual block mode:
| Command | Description |
|---|---|
| I | insert the same text in front of all the selected lines |
| A | append the same text after all the selected lines |
normal mode
alt + command + up / down
then i or a
快速注释
command + /
切换 file
CTRL + TAB
CTRL + 12345
参考:https://github.com/VSCodeVim/Vim/blob/HEAD/ROADMAP.md
相关文章:
vscode vim 快捷键汇总
需满足操作: 上下移动按照 word 移动选中增删改查找字符/变量移动、增加、复制、删除 行选中多个相同的变量/字符屏幕移动增加多个光标快速注释 上下左右移动 CommandDescription🔢 hleft (also: CTRL-H, BS, or Left key)🔢 lright (also…...
npm官方注册表和淘宝镜像切换
1.切换到淘宝镜像 加快npm包的下载速度, //已失效 //npm config set registry https://registry.npm.taobao.org/ npm config set registry https://registry.npmmirror.com这会将npm的注册表设置为淘宝镜像 查看: npm config get registry如果返回的…...
LFU算法
LFU算法 Least Frequently Used(最不频繁使用) Leetcode有原题,之前手写过LRU,数据结构还是习惯于用java实现,实现是copy的评论题解。 题解注释写的很清楚 大致就是说LFUCache类维护一个存放node的map,同…...
JVM系列-7内存调优
👏作者简介:大家好,我是爱吃芝士的土豆倪,24届校招生Java选手,很高兴认识大家📕系列专栏:Spring原理、JUC原理、Kafka原理、分布式技术原理、数据库技术、JVM原理🔥如果感觉博主的文…...
[UI5 常用控件] 01.Text
文章目录 前言1. 普通文本2. 长文本:3. 设置最大显示行数 ( maxLines3 )4. 单行显示 ( wrappingfalse )5. 显示空白符 ( renderWhitespacetrue )6. 使用 - 连接单词:只适用于英文 ( wrappingTypeHyphenated )7. 空白时使用 - 代替 ( emptyIndicatorModeOn )8. JSON数…...
C语言之指针的地址和指向的内容总结(八十四)
简介: CSDN博客专家,专注Android/Linux系统,分享多mic语音方案、音视频、编解码等技术,与大家一起成长! 优质专栏:Audio工程师进阶系列【原创干货持续更新中……】🚀 优质专栏:多媒…...
1月25日,每日信息差
第一、中国和新加坡互免签证,新加坡酒店搜索量较发布前增长4倍。去哪儿数据显示,新加坡酒店搜索量较发布前增长4倍,仍在持续增长中。同程旅行数据显示,消息发布半小时内,同程旅行平台新加坡相关搜索热度较前日同一时段…...
前端工程化之:webpack1-3(模块化兼容性)
一、模块化兼容性 由于 webpack 同时支持 CommonJs 和 ES6 module ,因此需要理解它们互操作时 webpack 是如何处理的。 二、同模块化标准 如果导出和导入使用的是同一种模块化标准,打包后的效果和之前所说的模块化没有任何差异。 CommonJSÿ…...
JDK8新特性(一)
一、概述 JDK8,又称为JDK 1.8,是Java语言开发的里程碑版本。这个版本引入了众多令人兴奋的新特性,让Java更加灵活和强大。其中,最引人注目的新特性包括Lambda表达式、方法引用、默认方法、Stream API、新的日期和时间API以及Optio…...
java实现ftp协议远程网络下载文件
引言 在开发过程中,偶尔会遇到网络文件在FTP服务上存储着,对于这种情况想要下载到本地还有些麻烦,我们直接上世界上最简单的代码。 How to do 1.提前引入包 <!--hutool万能工具包--><dependency><groupId>cn.hutool<…...
深入浅出理解目标检测的NMS非极大抑制
一、参考资料 物体检测中常用的几个概念迁移学习、IOU、NMS理解 目标定位和检测系列(3):交并比(IOU)和非极大值抑制(NMS)的python实现 Pytorch:目标检测网络-非极大值抑制(NMS) …...
HbuilderX报错“Error: Fail to open IDE“,以及运行之后没有打开微信开发者,或者运行没有反应的解决办法
开始 问题:HbuilderX启动时,打开微信开发者工具报错"Error: Fail to open IDE",以及运行之后没有打开微信开发者,或者运行没有反应的解决办法! 解决办法: 按照步骤一步一步完成分析,除非代码报错,否则都是可以启动的 第一步:检查HbuildX是否登录账号 第二步:检查微信…...
【Go 快速入门】基础语法 | 流程控制 | 字符串
文章目录 基础语法值变量常量运算符指针new 和 make 区别 字符串byte 和 rune 类型 流程控制for 循环If else 分支switch 分支 基础语法 项目代码地址:02-basicgrammar 值 基本类型值 Go 最基础的数据类型,比如整型、浮点型、布尔型。 复合类型值 …...
腾讯云轻量应用Ubuntu服务器如何一键部署幻兽帕鲁Palworld私服?
幻兽帕鲁/Palworld是一款2024年Pocketpair开发的开放世界生存制作游戏,在帕鲁的世界,玩家可以选择与神奇的生物“帕鲁”一同享受悠闲的生活,也可以投身于与偷猎者进行生死搏斗的冒险。而帕鲁可以进行战斗、繁殖、协助玩家做农活,也…...
Redis的SDS你了解吗?
初识SDS: Redis的String和其他很多编程语言中的语义相似,它能够表达3种值的类型: 1.字符串 2.整数 3.浮点数 三种类型根据具体场景由Redis完成相互之间的自动转换,并且根据需要选取底层的承载方式,Redis内部&#x…...
C#中常见的软件设计模式及应用场景
文章目录 前言1、单例模式 (Singleton)1.1 详细说明1.2 应用场景示例 2、工厂模式 (Factory Method)2.1 详细说明2.2 应用场景示例 3、观察者模式 (Observer)3.1 详细说明3.2 应用场景示例 4、策略模式 (Strategy)4.1 详细说明4.2 应用场景示例 5、适配器模式 (Adapter)5.1 详细…...
字符串相关函数和文件操作
文章目录 1. C/C 字符串概述1.1 字符串常量1.2 字符数组 2. 字符串函数2.1 拷贝赋值功能相关函数(覆盖)2.1.1 strcpy2.1.2 strncpy2.1.3 memcpy2.1.4 memmove2.1.5 memset2.1.6 注意小点2.1.7 【函数区别】 2.2 追加功能相关函数2.2.1 strcat2.2.2 strnc…...
【c++学习】数据结构中的栈
c栈 栈代码用线性表实现栈用链表实现栈 栈 栈:先进后出 只对栈顶元素进行操作,包括新元素入栈、栈顶元素出栈和查看栈顶元素(只支持对栈顶的增、删、查)。 代码 下述代码实现了栈及其接口 包括对栈顶的增、删、查以及查看栈的大…...
新建react项目,react-router-dom配置路由,引入antd
提示:reactrouter6.4版本,与reactrouter5.0的版本用法有区别,互不兼容需注意 文章目录 前言一、创建项目二、新建文件并引入react-router-dom、antd三、配置路由跳转四、效果五、遇到的问题六、参考文档总结 前言 需求:新建react项…...
Transformer and Pretrain Language Models3-6
Pretrain Language Models预训练语言模型 content: language modeling(语言模型知识) pre-trained langue models(PLMs)(预训练的模型整体的一个分类) fine-tuning approaches GPT and BERT(…...
线程与协程
1. 线程与协程 1.1. “函数调用级别”的切换、上下文切换 1. 函数调用级别的切换 “函数调用级别的切换”是指:像函数调用/返回一样轻量地完成任务切换。 举例说明: 当你在程序中写一个函数调用: funcA() 然后 funcA 执行完后返回&…...
Cloudflare 从 Nginx 到 Pingora:性能、效率与安全的全面升级
在互联网的快速发展中,高性能、高效率和高安全性的网络服务成为了各大互联网基础设施提供商的核心追求。Cloudflare 作为全球领先的互联网安全和基础设施公司,近期做出了一个重大技术决策:弃用长期使用的 Nginx,转而采用其内部开发…...
dify打造数据可视化图表
一、概述 在日常工作和学习中,我们经常需要和数据打交道。无论是分析报告、项目展示,还是简单的数据洞察,一个清晰直观的图表,往往能胜过千言万语。 一款能让数据可视化变得超级简单的 MCP Server,由蚂蚁集团 AntV 团队…...
安全突围:重塑内生安全体系:齐向东在2025年BCS大会的演讲
文章目录 前言第一部分:体系力量是突围之钥第一重困境是体系思想落地不畅。第二重困境是大小体系融合瓶颈。第三重困境是“小体系”运营梗阻。 第二部分:体系矛盾是突围之障一是数据孤岛的障碍。二是投入不足的障碍。三是新旧兼容难的障碍。 第三部分&am…...
CppCon 2015 学习:Time Programming Fundamentals
Civil Time 公历时间 特点: 共 6 个字段: Year(年)Month(月)Day(日)Hour(小时)Minute(分钟)Second(秒) 表示…...
统计学(第8版)——统计抽样学习笔记(考试用)
一、统计抽样的核心内容与问题 研究内容 从总体中科学抽取样本的方法利用样本数据推断总体特征(均值、比率、总量)控制抽样误差与非抽样误差 解决的核心问题 在成本约束下,用少量样本准确推断总体特征量化估计结果的可靠性(置…...
Easy Excel
Easy Excel 一、依赖引入二、基本使用1. 定义实体类(导入/导出共用)2. 写 Excel3. 读 Excel 三、常用注解说明(完整列表)四、进阶:自定义转换器(Converter) 其它自定义转换器没生效 Easy Excel在…...
21-Oracle 23 ai-Automatic SQL Plan Management(SPM)
小伙伴们,有没有迁移数据库完毕后或是突然某一天在同一个实例上同样的SQL, 性能不一样了、业务反馈卡顿、业务超时等各种匪夷所思的现状。 于是SPM定位开始,OCM考试中SPM必考。 其他的AWR、ASH、SQLHC、SQLT、SQL profile等换作下一个话题…...
NineData数据库DevOps功能全面支持百度智能云向量数据库 VectorDB,助力企业 AI 应用高效落地
NineData 的数据库 DevOps 解决方案已完成对百度智能云向量数据库 VectorDB 的全链路适配,成为国内首批提供 VectorDB 原生操作能力的服务商。此次合作聚焦 AI 开发核心场景,通过标准化 SQL 工作台与细粒度权限管控两大能力,助力企业安全高效…...
宠物车载安全座椅市场报告:解读行业趋势与投资前景
一、什么是宠物车载安全座椅? 宠物车载安全座椅是一种专为宠物设计的车内固定装置,旨在保障宠物在乘车过程中的安全性与舒适性。它通常由高强度材料制成,具备良好的缓冲性能,并可通过安全带或ISOFIX接口固定于车内。 近年来&…...
