当前位置: 首页 > news >正文

Vim相关配置

记录一下有关vim的一些设置,以免电脑寄了不好重新配置

vscode+vim

首先是vscode中的vim模式
在应用商店中搜索vim插件安装即可
然后在setting中添加以下有关vim 的配置

    "vim.easymotion": true,"vim.surround": true,"vim.incsearch": true,"vim.useSystemClipboard": true,"editor.lineNumbers": "relative","vim.useCtrlKeys": true,"vim.hlsearch": true,"vim.smartRelativeLine": false,"editor.cursorBlinking": "smooth","editor.cursorSmoothCaretAnimation": "on","vim.insertModeKeyBindings": [{"before": ["j", "j"],"after": ["<Esc>"]}],"vim.normalModeKeyBindingsNonRecursive": [{"before":["leader","e"],"commands": [{"command": "workbench.action.toggleSidebarVisibility"}]},{"before": ["<C-j>"],"after": ["4","j"]},{"before": ["<C-k>"],"after": ["4","k"]},{"before": ["<C-d>"],"after": ["9","j"]},{"before": ["<C-u>"],"after": ["9","k"]},{"before": ["<C-n>"],"commands": [":nohl"]},{"before": ["K"],"commands": ["lineBreakInsert"],"silent": true},{"before": ["<C-p>"],"commands": ["extension.fuzzySearch"],},{"before": ["H"],"after": ["^"            ]},{"before": ["L"],"after": ["$"            ]}],"vim.visualModeKeyBindings": [{"before": [">"],"commands": ["editor.action.indentLines"]},{"before": ["<"],"commands": ["editor.action.outdentLines"]},{"before": ["H"],"after": ["^"            ]},{"before": ["L"],"after": ["$"            ]}],"vim.leader": "<space>","vim.handleKeys": {"<C-a>": false,"<C-f>": false},"extensions.experimental.affinity": {"vscodevim.vim": 1},

然后是一些更加定制的东西,需要用到当前的不同状态,因此在keybindings.json中添加以下内容

[{"key": "ctrl+left","command": "workbench.action.increaseViewWidth","when": "vim.mode == 'Normal'"},{"key": "ctrl+right","command": "workbench.action.decreaseViewWidth","when": "vim.mode == 'Normal'"},{"key": "ctrl+up","command": "workbench.action.increaseViewHeight","when": "vim.mode == 'Normal'"},{"key": "ctrl+down","command": "workbench.action.decreaseViewHeight","when": "vim.mode == 'Normal'"},// 以下是 vim 绑定的键位{"key": "alt+j","command": "selectNextSuggestion","when": "vim.active && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"},{"key": "alt+k","command": "selectPrevSuggestion","when": "vim.active && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"},// 在 quickOpen 的对话框中上下跳转{"key": "ctrl+j","command": "workbench.action.quickOpenSelectNext","when": "vim.active && inQuickOpen"},{"key": "ctrl+k","command": "workbench.action.quickOpenSelectPrevious","when": "vim.active && inQuickOpen"},// 当光标聚焦在编辑器中且 vim 处于 normal 模式时,进行 tab 栏目的左右跳转{"key": "alt+h","command": "workbench.action.previousEditor","when": "editorTextFocus && vim.mode == 'Normal'"},{"key": "alt+l","command": "workbench.action.nextEditor","when": "editorTextFocus && vim.mode == 'Normal'"},// vim 模式下的左侧的文件管理器的操作// 在文件管理器中搜索{"key": "/","command": "list.find","when": "listFocus && listSupportsFind && !inputFocus"},// 新建一个文件{"key": "a","command": "explorer.newFile","when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"},// 新建一个文件夹{"key": "shift+a","command": "explorer.newFolder","when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"},// 给文件重命名{"key": "r","command": "renameFile","when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"},// 删除文件{"key": "d","command": "deleteFile","when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"},// 调整底部的 panel 的大小{"key": "ctrl+shift+k","command": "workbench.action.terminal.resizePaneUp","when": "terminalFocus"},{"key": "ctrl+shift+j","command": "workbench.action.terminal.resizePaneDown","when": "terminalFocus"},// 最大化 terminal{"key": "ctrl+win+`","command": "workbench.action.toggleMaximizedPanel","when": "terminalFocus"},{"key": "ctrl+w","command": "-workbench.action.closeActiveEditor"}
]

浏览器+vim

下载Vimium C插件,实现全键盘操作浏览器

主要就改了两个快捷键,让ctrl+j/k 快速上下翻动

map <c-j> scrollDown count=3
map <c-k> scrollUp count=3

将默认搜索引擎变为bing

https://cn.bing.com/search?q=$s

UI选的是下面这个配置

/* #ui */
* {
/*insertroot*/--font-size: 17px;--font-size-link: 12px;--font-weight: normal;--font: Source Code Pro, sans;--padding: 0px;--shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);/* ----------  DAY THEME  ---------- */--bg: #282c34;--fg: #969ca8;--accent-fg: #2e323c;--border: #000000;--title: #969ca8;--title-accent: #4892c6;--link: #6b7176;--link-accent: #d7ae74;/* ---------- NIGHT THEME ---------- */--nbg: #282c34;--nfg: #969ca8;--naccent-fg: #2e323c;--nborder: #000000;--ntitle: #969ca8;--ntitle-accent: #4892c6;--nlink: #6b7176;--nlink-accent: #d7ae74;font-family: var(--font);font-size: var(--font-size-link);
}/* HUD */
.HUD {border-radius: 3px;text-transform: lowercase;color: var(--title);max-width: 420px;min-width: unset;line-height: 20px;align-items: center;padding: 10px;
}.HUD.D {color: var(--ntitle);
}.HUD:after {background: var(--bg);border: var(--border);
}.HUD.D:after {background: var(--nbg);border: var(--nborder);
}.HUD.UI {min-width: 380px;align-items: unset;
}/* HINTS */
.LH {color: var(--fg);border: 1px solid var(--border);background: var(--bg);box-shadow: var(--shadow);
}.D .LH {color: var(--nfg);border: 1px solid var(--nborder);background: var(--nbg);box-shadow: var(--shadow);
}.MC {color: var(--accent-fg);
}.D .MC {color: var(--naccent-fg);
}/* #omni */
* {
/*insertroot*/--font-size: 17px;--font-size-link: 12px;--font-weight: normal;--font: Source Code Pro, sans;--padding: 0px;--shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);/* ----------  DAY THEME  ---------- */--bg: #282c34;--fg: #969ca8;--accent-fg: #2e323c;--border: #000000;--title: #969ca8;--title-accent: #4892c6;--link: #6b7176;--link-accent: #d7ae74;/* ---------- NIGHT THEME ---------- */--nbg: #282c34;--nfg: #969ca8;--naccent-fg: #2e323c;--nborder: #000000;--ntitle: #969ca8;--ntitle-accent: #4892c6;--nlink: #6b7176;--nlink-accent: #d7ae74;font-family: var(--font);/*font-size: var(--font-size);*/
}body {animation: show 200ms cubic-bezier(0, 0, 0.2, 1) forwards;box-shadow: var(--shadow);
}body.has-dark{}/* Animate Slide in */
@keyframes show {0% {opacity: 0;transform: translateY(50px);}100% {opacity: 1;transform: translateY(0);}
}#toolbar {top: 10px;right: 14px;opacity: 0;
}#toolbar:hover {opacity: 1;
}#bar, #input, #list {background: var(--bg);font-weight: var(--font-weight);
}
.has-dark #bar, .has-dark #input, .has-dark #list {background: var(--nbg);
}#bar{padding: 10px;
/*padding: var(--padding);*/border-bottom: none;
}#bar::before{
/*for hint or content icon before typing*/content: "➤";position: absolute;left: 20px;z-index: 300;padding: 6px 0;font-weight: bold;font-size: var(--font-size);color: var(--fg);
}.has-dark #bar::before{color: var(--nfg);
}#input {padding: var(--padding) 38px;color: var(--title);border: none;box-shadow: none;
}.has-dark #input {color: var(--ntitle);
}.item .icon {width: 24px;height: 24px;padding-right: unset;margin-right: 10px;margin-top: 5px;background-position: bottom right;
}.item .icon path {opacity: 0.25;position: absolute;z-index: -1;transform-origin: 0px 0px;transform: scale(0.75);
}.item.s,
.item:hover {background-color: var(--accent-fg);border: 3px rgba(0, 0, 0, 0.02) solid;cursor: pointer;
}.has-dark .item.s,
.has-dark .item:hover {background-color: var(--naccent-fg);
}.item .top {color: var(--title);position: relative;height: 30px;
}.has-dark .item .top {color: var(--ntitle);
}.item .top .title {font-size: var(--font-size);line-height: 10px;margin-top: 2px;
}.item .top .title match {color: var(--title-accent);
}.has-dark .item .top .title match {color: var(--ntitle-accent);
}.item .top .title:empty::after {content: "<blank>";
}.item .bottom {margin-top: -14px;padding-left: 14px;
}.item .bottom a {color: var(--link);font-size: var(--font-size-link);
}.has-dark .item .bottom a {color: var(--nlink);
}.item .bottom a match {color: var(--nlink-accent);text-decoration: none;
}.has-dark .item .bottom a match {color: var(--nlink-accent);
}/* #find */
* {
/*insertroot*/--font-size: 17px;--font-size-link: 12px;--font-weight: normal;--font: Source Code Pro, sans;--padding: 0px;--shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);/* ----------  DAY THEME  ---------- */--bg: #282c34;--fg: #969ca8;--accent-fg: #2e323c;--border: #000000;--title: #969ca8;--title-accent: #4892c6;--link: #6b7176;--link-accent: #d7ae74;/* ---------- NIGHT THEME ---------- */--nbg: #282c34;--nfg: #969ca8;--naccent-fg: #2e323c;--nborder: #000000;--ntitle: #969ca8;--ntitle-accent: #4892c6;--nlink: #6b7176;--nlink-accent: #d7ae74;font-family: var(--font);/*font-size: var(--font-size);*/
}.r {color: var(--title-accent);background: var(--bg);border: none;box-shadow: none;
}.r.D {color: var(--ntitle-accent);background: var(--nbg);
}#i {color: var(--link-accent);
}.D #i {color: var(--nlink-accent);
}/* #find:host *//* #find:selection */

lazyvim

下载powershell

下载Neovim

下载lazyvim的配置

相关文章:

Vim相关配置

记录一下有关vim的一些设置&#xff0c;以免电脑寄了不好重新配置 vscodevim 首先是vscode中的vim模式 在应用商店中搜索vim插件安装即可 然后在setting中添加以下有关vim 的配置 "vim.easymotion": true,"vim.surround": true,"vim.incsearch"…...

ARMv8-AArch64 的异常处理模型详解之异常处理详解(进入异常以及异常路由)

在上篇文章 ARMv8-AArch64 的异常处理模型详解之异常处理概述Handling exceptions中&#xff0c;作者对异常处理整体流程以及相关概念做了梳理。接下来&#xff0c;本文将详细介绍处理器在获取异常、异常处理以及异常返回等过程中都做了哪些工作。 ARMv8-AArch64 的异常处理模型…...

unity学习(19)——客户端与服务器合力完成注册功能(1)入门准备

逆向服务器用了三天的时间&#xff0c;但此时觉得一切都值&#xff0c;又可以继续学习了。 服务器中登录请求和注册请求由command变量进行区分&#xff0c;上一层的type变量都是login。 public void process(Session session, SocketModel model) {switch (model.Command){ca…...

论文精读--对比学习论文综述

InstDisc 提出了个体判别任务&#xff0c;而且利用这个代理任务与NCE Loss去做对比学习从而得到了不错的无监督表征学习的结果&#xff1b;同时提出了别的数据结构——Memory Bank来存储大量负样本&#xff1b;解决如何对特征进行动量式的更新 翻译&#xff1a; 有监督学习的…...

文章复现 | 差异分析和PPI网络构建

原文链接&#xff1a;差异分析和PPI网路图绘制教程 写在前面 在原文中&#xff0c;作者获得285个DEG&#xff0c;在此推文中共获得601个DEG。小杜的猜想是标准化的水段不同的原因吧&#xff0c;或是其他的原因。此外&#xff0c;惊奇的发现发表医学类的文章在附件中都不提供相…...

入门级10寸加固行业平板—EM-I10J

亿道信息以其坚固耐用的智能终端设备而闻名&#xff0c;近日发布了一款理想入门级 10 英寸加固平板电脑—I10J。 EM-I10J​​ 这是一款 10 英寸的平板电脑&#xff0c;主要运行 Windows 10操作系统&#xff0c;带有硬化塑料外壳&#xff0c;具有 IP65 防水防尘功能和 MIL-STD 8…...

gem5 garnet 合成流量: packet注入流程

代码流程 下图就是全部. 剩下文字部分是细节补充,但是内容不变: bash调用python,用python配置好configuration, 一个cpu每个tick运行一次,requestport发出pkt. bash 启动 python文件并配置 ./build/NULL/gem5.debug configs/example/garnet_synth_traffic.py \--num-cpus…...

java实现排序算法(上)

排序算法 冒泡排序 时间和空间复杂度 要点 每轮冒泡不断地比较比较相邻的两个元素,如果它们是逆序的,则需要交换它们的位置下一轮冒泡,可以调整未排序的右边界,减少不必要比较 代码 public static int[] test(int[] array) {// 外层循环控制遍历次数for (int i 0; i <…...

「算法」滑动窗口

前言 算法需要多刷题积累经验&#xff0c;所以我行文重心在于分析解题思路&#xff0c;理论知识部分会相对简略一些 正文 滑动窗口属于双指针&#xff0c;这两个指针是同向前行&#xff0c;它们所夹的区间就称为“窗口” 啥时候用滑动窗口&#xff1f; 题目涉及到“子序列…...

Windows11(非WSL)安装Installing llama-cpp-python with GPU Support

直接安装&#xff0c;只支持CPU。想支持GPU&#xff0c;麻烦一些。 1. 安装CUDA Toolkit (NVIDIA CUDA Toolkit (available at https://developer.nvidia.com/cuda-downloads) 2. 安装如下物件&#xff1a; gitpythoncmakeVisual Studio Community (make sure you install t…...

rtt设备io框架面向对象学习-脉冲编码器设备

目录 1.脉冲编码器设备基类2.脉冲编码器设备基类的子类3.初始化/构造流程3.1设备驱动层3.2 设备驱动框架层3.3 设备io管理层 4.总结5.使用 1.脉冲编码器设备基类 此层处于设备驱动框架层。也是抽象类。 在/ components / drivers / include / drivers 下的pulse_encoder.h定义…...

华为OD机试真题- 攀登者2-2024年OD统一考试(C卷)

题目描述: 攀登者喜欢寻找各种地图,并且尝试攀登到最高的山峰。地图表示为一维数组,数组的索引代表水平位置,数组的高度代表相对海拔高度。其中数组元素0代表地面。例如[0,1,4,3,1,0,0,1,2,3,1,2,1,0], 代表如下图所示的地图,地图中有两个山脉位置分别为 1,2,3,4,5和8,9,1…...

19.Qt 组合框的实现和应用

目录 前言&#xff1a; 技能&#xff1a; 内容&#xff1a; 1. 界面 2.槽 3.样式表 参考&#xff1a; 前言&#xff1a; 学习QCombox控件的使用 技能&#xff1a; 简单实现组合框效果 内容&#xff1a; 1. 界面 在ui编辑界面找到input widget里面的comboBox&#xff…...

【Linux】进程地址空间的理解

进程地址空间的理解 一&#xff0c;什么是程序地址空间二&#xff0c;页表和虚拟地址空间三&#xff0c;为什么要有进程地址空间 一&#xff0c;什么是程序地址空间 在我们写程序时&#xff0c;都会有这样下面的内存结构&#xff0c;来存放变量和代码等数据。 一个进程要执行…...

【Jvm】类加载机制(Class Loading Mechanism)原理及应用场景

文章目录 Jvm基本组成一.什么是JVM类的加载二.类的生命周期阶段1&#xff1a;加载阶段2&#xff1a;验证阶段3&#xff1a;准备阶段4&#xff1a;解析阶段5&#xff1a;初始化 三.类初始化时机四.类加载器1.引导类加载器&#xff08;Bootstrap Class Loader&#xff09;2.拓展类…...

Spring AOP的实现方式

AOP基本概念 Spring框架的两大核心&#xff1a;IoC和AOP AOP&#xff1a;Aspect Oriented Programming&#xff08;面向切面编程&#xff09; AOP是一种思想&#xff0c;是对某一类事情的集中处理 面向切面编程&#xff1a;切面就是指某一类特定的问题&#xff0c;所以AOP可…...

Linux------环境变量

目录 前言 一、环境变量 二、添加PATH环境变量 三、HOME环境变量 四、查看所有环境变量 1.指令获取 2.代码获取 2.1 getenv 2.2main函数的第三个参数 2.3 全局变量environ 五、环境变量存放地点 六、添加自命名环境变量 七、系统环境变量具有全局属性 八、环境变…...

计算机视觉所需要的数学基础

计算机视觉领域中使用的数学知识广泛而深入&#xff0c;以下是一些关键知识点及其在计算机视觉中的应用&#xff1a; 线性代数&#xff1a; - 矩阵运算&#xff1a;用于图像的表示和处理&#xff0c;如图像旋转、缩放、裁剪等。 - 向量空间&#xff1a;用于描述图像中的…...

ChatGPT魔法1: 背后的原理

1. AI的三个阶段 1&#xff09; 上世纪50~60年代&#xff0c;计算机刚刚产生 2&#xff09; Machine learning 3&#xff09; Deep learning&#xff0c; 有神经网络&#xff0c; 最有代表性的是ChatGPT, GPT(Generative Pre-Trained Transformer) 2. 深度神经网络 llya Suts…...

【c/c++】获取时间

在一些应用的编写中我们有时候需要用到时间&#xff0c;或者需要一个“锚点”来确定一些数的值。在c/c中有两个用来确定时间的函数&#xff1a;time/gettimeofday 一、time time_t time(time_t *timer);time 函数返回当前时间的时间戳&#xff08;自 1970 年 1 月 1 日以来经…...

【Python】 -- 趣味代码 - 小恐龙游戏

文章目录 文章目录 00 小恐龙游戏程序设计框架代码结构和功能游戏流程总结01 小恐龙游戏程序设计02 百度网盘地址00 小恐龙游戏程序设计框架 这段代码是一个基于 Pygame 的简易跑酷游戏的完整实现,玩家控制一个角色(龙)躲避障碍物(仙人掌和乌鸦)。以下是代码的详细介绍:…...

零门槛NAS搭建:WinNAS如何让普通电脑秒变私有云?

一、核心优势&#xff1a;专为Windows用户设计的极简NAS WinNAS由深圳耘想存储科技开发&#xff0c;是一款收费低廉但功能全面的Windows NAS工具&#xff0c;主打“无学习成本部署” 。与其他NAS软件相比&#xff0c;其优势在于&#xff1a; 无需硬件改造&#xff1a;将任意W…...

STM32+rt-thread判断是否联网

一、根据NETDEV_FLAG_INTERNET_UP位判断 static bool is_conncected(void) {struct netdev *dev RT_NULL;dev netdev_get_first_by_flags(NETDEV_FLAG_INTERNET_UP);if (dev RT_NULL){printf("wait netdev internet up...");return false;}else{printf("loc…...

SCAU期末笔记 - 数据分析与数据挖掘题库解析

这门怎么题库答案不全啊日 来简单学一下子来 一、选择题&#xff08;可多选&#xff09; 将原始数据进行集成、变换、维度规约、数值规约是在以下哪个步骤的任务?(C) A. 频繁模式挖掘 B.分类和预测 C.数据预处理 D.数据流挖掘 A. 频繁模式挖掘&#xff1a;专注于发现数据中…...

unix/linux,sudo,其发展历程详细时间线、由来、历史背景

sudo 的诞生和演化,本身就是一部 Unix/Linux 系统管理哲学变迁的微缩史。来,让我们拨开时间的迷雾,一同探寻 sudo 那波澜壮阔(也颇为实用主义)的发展历程。 历史背景:su的时代与困境 ( 20 世纪 70 年代 - 80 年代初) 在 sudo 出现之前,Unix 系统管理员和需要特权操作的…...

AI编程--插件对比分析:CodeRider、GitHub Copilot及其他

AI编程插件对比分析&#xff1a;CodeRider、GitHub Copilot及其他 随着人工智能技术的快速发展&#xff0c;AI编程插件已成为提升开发者生产力的重要工具。CodeRider和GitHub Copilot作为市场上的领先者&#xff0c;分别以其独特的特性和生态系统吸引了大量开发者。本文将从功…...

Java多线程实现之Thread类深度解析

Java多线程实现之Thread类深度解析 一、多线程基础概念1.1 什么是线程1.2 多线程的优势1.3 Java多线程模型 二、Thread类的基本结构与构造函数2.1 Thread类的继承关系2.2 构造函数 三、创建和启动线程3.1 继承Thread类创建线程3.2 实现Runnable接口创建线程 四、Thread类的核心…...

Spring Cloud Gateway 中自定义验证码接口返回 404 的排查与解决

Spring Cloud Gateway 中自定义验证码接口返回 404 的排查与解决 问题背景 在一个基于 Spring Cloud Gateway WebFlux 构建的微服务项目中&#xff0c;新增了一个本地验证码接口 /code&#xff0c;使用函数式路由&#xff08;RouterFunction&#xff09;和 Hutool 的 Circle…...

ip子接口配置及删除

配置永久生效的子接口&#xff0c;2个IP 都可以登录你这一台服务器。重启不失效。 永久的 [应用] vi /etc/sysconfig/network-scripts/ifcfg-eth0修改文件内内容 TYPE"Ethernet" BOOTPROTO"none" NAME"eth0" DEVICE"eth0" ONBOOT&q…...

云原生玩法三问:构建自定义开发环境

云原生玩法三问&#xff1a;构建自定义开发环境 引言 临时运维一个古董项目&#xff0c;无文档&#xff0c;无环境&#xff0c;无交接人&#xff0c;俗称三无。 运行设备的环境老&#xff0c;本地环境版本高&#xff0c;ssh不过去。正好最近对 腾讯出品的云原生 cnb 感兴趣&…...