• linux centos7 升级 vim7.4位8.2


    1、系统

    [root@localhost test]# lsb_release -a
    LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
    Distributor ID: CentOS
    Description:    CentOS Linux release 7.9.2009 (Core)
    Release:        7.9.2009
    Codename:       Core

    2、vim当前版本

    [root@localhost test]# vim --version | head
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 15 2020 16:44:08)
    Included patches: 1-207, 209-629
    Modified by <bugzilla@redhat.com>
    Compiled by <bugzilla@redhat.com>
    Huge version without GUI.  Features included (+) or not (-):
    +acl             +farsi           +mouse_netterm   +syntax
    +arabic          +file_in_path    +mouse_sgr       +tag_binary
    +autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
    -balloon_eval    +float           +mouse_urxvt     -tag_any_white
    -browse          +folding         +mouse_xterm     -tcl

    3、卸载vim

    [root@localhost test]# yum remove vim -y

    4、下载vim8.2安装包及安装

    [root@localhost software]# wget https://github.com/vim/vim/archive/v8.2.1862.tar.gz
    [root@localhost software]# tar -xzvf v8.2.1862.tar.gz
    [root@localhost software]# mv v8.2.1862.tar.gz vim-8.2.1862/
    [root@localhost software]# cd vim-8.2.1862/
    [root@localhost vim-8.2.1862]# ./configure --prefix /usr/share/vim/
    [root@localhost vim-8.2.1862]# make
    [root@localhost vim-8.2.1862]# make install

    5、测试新版本

    [root@localhost bin]# /usr/share/vim/bin/vim --version | head
    VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May  6 2022 20:28:39)
    Included patches: 1-1862
    Compiled by root@localhost.localdomain
    Huge version without GUI.  Features included (+) or not (-):
    +acl               -farsi             +mouse_sgr         +tag_binary
    +arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
    +autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
    +autochdir         +float             +mouse_xterm       -tcl
    -autoservername    +folding           +multi_byte        +termguicolors
    -balloon_eval      -footer            +multi_lang        +terminal

    6、添加命令别名、环境变量

    [root@localhost bin]# echo "alias vim='/usr/share/vim/bin/vim' " >> /etc/bashrc
    [root@localhost bin]# source /etc/bashrc
    [root@localhost bin]# vim --version | head
    VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May  6 2022 20:28:39)
    Included patches: 1-1862
    Compiled by root@localhost.localdomain
    Huge version without GUI.  Features included (+) or not (-):
    +acl               -farsi             +mouse_sgr         +tag_binary
    +arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
    +autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
    +autochdir         +float             +mouse_xterm       -tcl
    -autoservername    +folding           +multi_byte        +termguicolors
    -balloon_eval      -footer            +multi_lang        +terminal

    没有问题。

  • 相关阅读:
    网络中有三种通讯模式:单播、广播、组播(多播)
    chmod命令
    linux bash 命令重定向和多命令执行
    linux中管道符“|”的作用
    web测试常用的 linux 命令
    集群主要分成三大类 (高可用集群, 负载均衡集群,科学计算集群)
    iOS 监测电话呼入
    iOS NSUserDefaults [setValue:forKey:] [setObject:forKey:] <Objc> setValue(_,forKey:) set(_,forKey) <Swift 3>
    iOS 将navigationItem.titleView设置为自定义UISearchBar (Ficow实例讲解)
    iOS 加载Viewcontroller的几种方法
  • 原文地址:https://www.cnblogs.com/liujiaxin2018/p/16226245.html
Copyright © 2020-2023  润新知