看阮老师的博客,较详细:http://www.ruanyifeng.com/blog/2018/09/vimrc.html
一、基础知识
Vim是从 vi 发展出来的一个文本编辑器。代码补完、编译及错误跳转等方便编程的功能特别丰富,在程序员中被广泛使用。
简单的来说, vi 是老式的字处理器,不过功能已经很齐全了,但是还是有可以进步的地方。 vim 则可以说是程序开发者的一项很好用的工具。
连 vim 的官方网站 (http://www.vim.org) 自己也说 vim 是一个程序开发工具而不是文字处理软件
Vim 的全局配置一般在/etc/vim/vimrc
或者/etc/vimrc
,对所有用户生效。用户个人的配置在~/.vimrc
。
vim键盘图:
vim 有三种模式 命令模式 刚进入就是命令模式 输入 i o a 进入编辑模式 esc推出编辑模式 :进入 底线命令模式 q 推出 w 保存 ! 强制退出