Centos默认自带VI,功能没VIM丰富,安装VIM取代VI。 用Yum查找源中的VIM包,不知安装哪个合适。 yum search vim vim-X11.i386 : The VIM version of the vi editor for the X Window System. vim-common.i386 : The common files needed by any version of the VIM editor. vim-enhanced.i386 : A version of the VIM editor which includes recent enhancements. vim-minimal.i386 : A minimal version of the VIM editor. 到已安装VIM的系统中查看VIM属于哪个软件包: which vim /usr/bin/vim rpm -qf /usr/bin/vim vim-enhanced-7.0.109-7.el5 安装VIM: yum install vim-enhanced命令总结
shift+g调到文本的最后
:set number 给文本添加行号