Blogger Information
Blog 63
fans 2
comment 0
visits 163431
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
CentOS7 没有vim命令解决方法 -bash: vim: 未找到命令
书声的博客
Original
12876 people have browsed it

最近在设置数据库主从同步时,使用VIM命令编辑配置文件时,提示:

一、yum 下载 vim

  1. yum -y install vim*

二、安装完成之后开始配置 vim

  1. vim /etc/vimrc

三、打开文件后,按 i 进入编辑模式,然后找一个位置添加如下代码

  1. set nu " 设置显示行号
  2. set showmode " 设置在命令行界面最下面显示当前模式等
  3. set ruler " 在右下角显示光标所在的行数等信息
  4. set autoindent " 设置每次单击Enter键后,光标移动到下一行时与上一行的起始字符对齐
  5. syntax on " 即设置语法检测,当编辑C或者Shell脚本时,关键字会用特殊颜色显示

四、检查是否安装成

  1. rpm -qa|grep vim

原文作者:Jack_OSS
原文参考链接:https://blog.csdn.net/weixin_44057684/article/details/104967166

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post