Esc //退出编辑模式i //进入编辑模式,光标停留在当前位置o //进入编辑模式,在当前行之后新建一行,光标停留在新行行首dd //删除当前光标所在行,在命令前加数字可以删除多行,如 5dd 将删除从当前行开始向下5行yy //复制当前光标所在行,在命令前加数字可以复制多行,如 5yy 将复制从当前行开始向下5行p //把复制的内容粘在当前行下面,大写的P就粘上面gg //跳到文件第一行u //撤销gg=G //规范缩进:w //保存:q //退出:q! //不保存强制退出:%s/old/new/g //搜索整个文件,将old都替换成new,old和new是字符串
syntax onset tabstop=8set softtabstop=8set shiftwidth=4set cindentset nuif has("autocmd")au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block"au VimLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"endif
原文:http://www.cnblogs.com/qhy285571052/p/82eaf2f43aedebb2c4997e8df6e873ed.html