安装完成后开始配置vim
vim /etc/vimrc
1 出现
~
~
~
~
~ VIM - Vi IMproved
~
~ version 7.4.629
~ by Bram Moolenaar et al.
~ Modified by <bugzilla@redhat.com>
~ Vim is open source and freely distributable
~
~ Help poor children in Uganda!
~ type :help iccf<Enter> for information
~
~ type :q<Enter> to exit
~ type :help<Enter> or <F1> for on-line help
~ type :help version7<Enter> for version info
~
~
~
~
~
~
0,0-1 All
复制 version 7.4.629 百度到该配置版本
打开文件后,按 i 进入编辑模式,然后找一个位置添加如下代码
set nu " 设置显示行号
set showmode " 设置在命令行界面最下面显示当前模式等
set ruler " 在右下角显示光标所在的行数等信息
set autoindent " 设置每次单击Enter键后,光标移动到下一行时与上一行的起始字符对齐
syntax on " 即设置语法检测,当编辑C或者Shell脚本时,关键字会用特殊颜色显示
按Esc,然后输入
:wq
额外具体配置详见
作者:ZYLoooong
链接:https://www.jianshu.com/p/b7efcca4fd92