centos下的vim安装

来源:互联网 发布:2018房价知乎 编辑:程序博客网 时间:2024/05/19 03:27

一 . 大家的都知道Linux下是自带vi ,那么我们如何对vi使用呢?

  1. 在centos下打开terminal,通过
    touch aa.txt //新建一个名称为aa的文本文件。


2. 用vi打开该文本

    vi aa.txt


3. 对文本进行操作,常用操作自行查找

二. centos下安装vim,因为vi的功能没有vim丰富

用yum查找源中的VIM包,不知安装哪个合适。

yum search vimvim-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/vimrpm -qf /usr/bin/vimvim-enhanced-7.0.109-7.el5

安装VIM:

yum install vim-enhanced

安装好界面如下:

这里写图片描述

0 0
原创粉丝点击