vim编辑器是Linux中的强大组件,是vi编辑器的加强版
在Linux命令行输入vim时提示:-bash:vim:common not found,之后按着查询到的解决办法整好了:
![](http://upload-images.jianshu.io/upload_images/14175010-6f28bb651427c038.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/466/format/webp)
解决步骤如下:
1.输入 rpm-qa|grep vim 命令,查看返回如下结果,如果返回的是四条结果: (版本号不重要)
![](http://upload-images.jianshu.io/upload_images/14175010-1a31f70f74d4bab0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/272/format/webp)
则说明vim已经正确安装,如果缺少一条,则需要单独安装
而实验中发现 本机只有一条 则需要安装 剩余的几条
![](http://upload-images.jianshu.io/upload_images/14175010-7306bfb28aeccd7b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/450/format/webp)
输入命令:yum -y install vim-enhanced 开始下载安装作为依赖其他也会被安装进来(如果没有安装其他文件,则单独再进行安装)
![](http://upload-images.jianshu.io/upload_images/14175010-430725872b7c25ca.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
安装完毕后 出现
![](http://upload-images.jianshu.io/upload_images/14175010-47a06bc85c943a4d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)