VIM中的编辑和移动命令
Move
- h/i/j/k
- f/F 在同一行内查找
- / or ? 查找整个文档
- gg/G 移动到文档起始/结束
- */# 查找当前光标下的word
- zt(top) zb(buttom) zz 移动当前行到屏幕顶部/底部/中间
- H M L (high low middle) 移动光标到屏幕顶部/中间/底部
- ctrl+u/d ctrl+f/b 往前/日后移动半屏 往前/日后移动一屏
- w(next word)/b(begin of word)/e(end of word) W/B/E word move, 大写和小写时区分单词的方式不同。
- m (mark) ma 而后使用'a可以回到标记为a的地方。
Edit
- a/A/i/I
- r replace
- c change (by deleting, then placing you in insert mode) cw c$ ctl(changes until the next l character)
- d delete d5w dd d5d(delete 5 lines) d0 de d$ dtl(delete until the next l character)
- x/X remove under or left character.
欢迎关注本站公众号,获取更多信息