Created
December 31, 2014 16:41
-
-
Save elrrrrrrr/2a55d8c4264f83f35501 to your computer and use it in GitHub Desktop.
tiny VIMtutor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tiny VIM tutor . | |
## 移动光标 | |
* `hjkl` -> 左下上右 | |
## 重复 | |
* `number command object` -> 重复 | |
## 删除 | |
* `dd` -> 删除整行 | |
* `dw` -> 删除当前单词 | |
* `d$` -> 删除至行尾 | |
* `:u` -> 撤销操作 | |
* `:U` -> 撤销当前行操作 | |
* `:r` -> redo | |
## 插入 | |
* `p` -> 黏贴删除内容 | |
* `r` -> 替换当前字符 | |
* `c$` -> 删除至行尾 | |
## 搜索 | |
* `C-g` -> 当前文件信息 | |
* `/ || ? + n || N` -> 向下 || 向上 搜索,移至下个 || 上个结果 | |
* `%` -> 移至匹配的括号 | |
* `:s/old/new` -> 替换单词 | |
* `:#,#s/old/new/gc` -> 替换两行内的单词(是否需要用户确认) | |
## 命令 | |
* `:!command` -> 执行command | |
* `:#,#w FILENAME` -> 将行内内容保存文件 | |
## 切换 | |
* `o || O` -> 上 || 下插入一行 | |
* `a || A` -> 当前位置 || 行末 插入 | |
* `R` -> 替换模式 | |
## 帮助 | |
* `:help` -> 帮助命令 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment