Vim 常用命令
来源:互联网 发布:手机淘宝设置降价提醒 编辑:程序博客网 时间:2024/05/17 18:11
Motions
small granular: move by direction
`k``h` `l` `j`
mid granular: move by word
- `e` move onto the end of the current word- `b` move onto the head of the current word- `w` move onto the head of the next word
large granular: move by line
- `$` move onto the head char of the line- `0` move onto the tail char of the line
huge granular: move by paragraph
- `{` move onto the last blank line- `(` move onto the begnning of this paragraph- `}` & `)` move onto the next blank line
extreme granular: move by file
- `[line number]G` move to the specific line- `gg` move to the first line of the file- `G` move to the last line of the file
Operators
Operators make effects on the corpus when assigned to some range (defined by cursor movement or the object). Operator could be doubled to work on the current line
{Operator} + {Motions} OR {Object} = Operation
- d
delete
- daw
aw
for a word(defined by space)
- dap
ap
for a whole paragraph(defined by blank line)
- y
yank into register
- c
change
- g~
swap case
- gu
make lowercase
- gU
Make uppercase
- >
shift right
- <
shift right
- =
auto indent
- !
filter {Motion} lines through an external program
Undo Tasks
- `u` undo one certain operation (one editing command in normal mode, all editing in insert mode last time)- `Ctrl-r` for redo one task
Special Command g
Begin Editing
into INSERT mode
- `i` begin inserting at current position - `a` begin inserting at the next position- `A` begin inserting at the end of the line- `o` begin inserting at the beginning of the new line below- `O` begin inserting at the beginning of the new line above- `s` delete the current char & begin inserting - `S` delete the current line & begin inserting at the head of current line- `C` delete the rest of current line & begin editing
local modification
- `r` character replacement (quit insert mode after one char modification)- `D` delete the rest of the line- `J` combine this line and the next
Copy and Paste
- 删除的文本将储存在寄存器中
- p 将寄存器的内容放在光标下方的行
f{char} find the next occurence of {char}
; repeat the last search operation
Command in INSERT modes
Delete in insert mode
- `Ctrl-h` Backspace- `Ctrl-w` delect back one word- `Ctrl-u` delect back to start of line
阅读全文
0 0
- VIM常用命令
- vim常用命令
- vim常用命令
- vim常用命令
- Vim常用命令
- vim常用命令
- vim常用命令
- vim常用命令
- VIM 常用命令
- VIM常用命令
- vim 常用命令
- vim常用命令
- vim 常用命令
- #vim常用命令
- VIM 常用命令
- vim常用命令
- VIM 常用命令
- vim常用命令
- Light-Head R-CNN算法笔记
- web几种跨域請求的方式
- 程序员漫画系列-80端口之战
- Coursera吴恩达《卷积神经网络》课程笔记(1)-- 卷积神经网络基础
- pyquery用法详解
- Vim 常用命令
- IM状态同步究竟是推还是拉
- 算法之路之征服上海交大的oj- 二哥炒股票
- 我的公司应该使用AI吗?英伟达, DeepMind 等10家AI机构试图用这份报告为你解答
- 阿里获中文语法大赛 CGED冠军后,我们和领队科学家聊了聊中文语义识别
- 【BZOJ3999】【TJOI2015】旅游 树剖
- 如何用1亿条数据分析一座城市? 这群人找到了一个有趣的切入口:地铁
- 网页中嵌入天气预报
- 为什么说jsp是servlet?JSP是如何转换成servlet的?