Back to skills
SKILL.md
Posts
ASecurity1. 撤销:普通模式下输入 `u`; 2. 插入:普通模式下在 光标处输入`i`在光标后插入,任意位置输入`o`新行插入; 3. 删除:普通模式下光标放在待删除行,`dd` 即可删除; 4. 复制行: - 普通模式下输入 `yy` 复制光标所在行; - 普通模式下输入 `nyy` 复制光标所在的向下 n 行; 5. 粘贴行: - `p` 将已复制的数据在光标下一行粘贴; - `P` 将已复制的数据在光标上一行粘贴;
- 4 stars
- 0 votes
- 0 copies
- 1 view
- Added February 6, 2026
Security analysis
100/100Pro scans all 21 files and shows the line behind each finding
npx -y skills add sleticalboy/sleticalboy.github.io --skill _posts --agent claude-codeAre you the author of Posts?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sleticalboy-posts)---
layout: post
title: vim 使用技巧
author: sleticalboy
date: 2020-07-20 16:59:19
category: linux
tags: [linux, tools]
---
## 编辑
1. 撤销:普通模式下输入 `u`;
2. 插入:普通模式下在 光标处输入`i`在光标后插入,任意位置输入`o`新行插入;
3. 删除:普通模式下光标放在待删除行,`dd` 即可删除;
4. 复制行:
- 普通模式下输入 `yy` 复制光标所在行;
- 普通模式下输入 `nyy` 复制光标所在的向下 n 行;
5. 粘贴行:
- `p` 将已复制的数据在光标下一行粘贴;
- `P` 将已复制的数据在光标上一行粘贴;
## 其他
1. 选择:普通模式下输入 `v` 进入 `visual` 模式,`j`/`k`/`l`/`h` 进行移动,输入`^` 光标处到行首,输入 `$` 光标处到行尾,`y` 复制,`p` 粘贴,`d` 剪切;
2. 行号显示隐藏:普通模式下输入 `shift+:`, 然后输入 `set nu` 显示行号,输入 `set nonu` 隐藏行号;
## 搜索
1. 普通模式下输入 `/keyword` 回车进行搜索,输入 `n` 跳转到下一处;
2. 普通模式下光标放在单词任意处,输入 `shift+*` 即可跳转到相同单词处;
## 多窗口模式
1. 普通模式下输入 `:sp [filename]`
- 如果文件名为空,则在新窗口中同步打开当前文件
- 如果文件名不为空,则在新窗口中打开新文件
2. 光标移动到上一个窗口:`ctrl + w + k/↑`
3. 光标移动到下一个窗口:`ctrl + w + j/↓`
4. 关闭窗口:`ctrl + w + q`
Files in this skill
- 2019-01-16-Daily-Question-Record.md
- 2019-01-16-android-mediaplayer.md
- 2019-01-16-fast-json.md
- 2019-01-16-glide.md
- 2019-01-16-okio.md
- 2019-01-16-retrofit.md
- 2019-01-20-IO.md
- 2019-01-20-android-enhance-01-app-crash.md
- 2019-01-21-build-aosp.md
- 2019-01-21-build-idegen-jar.md
- 2019-04-07-install-gitlab-ce.md
- 2019-04-07-linux-commands.md
- 2019-04-07-objectbox.md
- 2019-04-08-app启动流程分析-01.md
- 2019-04-12-install-appimage-on-linux.md
- 2019-04-13-app启动流程分析-02.md
- 2019-04-16-AndroidManifest文件解析.md
- 2019-07-08-okhttp.md
- 2019-07-15-aosp-checkout-branch.md
- 2019-09-01-crack-umeng-database.md
Attribution
Comments
Loading comments…