CentOS7 安装 Gvim

  1. 安装 vim-X11
    sudo yum install vim vim-X11

  2. 下载 配置
    sudo git clone https://github.com/xunzhibin/.vim.git ~/.vim

  3. 设置 配置文件 软连接
    ln -s ~/.vim/.vimrc ~/.vimrc

  4. 安装 插件(如果安装失败, 可以使用逐一单个安装)
    sudo git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/Vundle.vim
    vim +PluginInstall +qall

  5. 相关 插件

    • Vundle 管理(必须)
      VundleVim/Vundle.vim
    • 主题
      altercation/vim-colors-solarized
    • 状态栏
      vim-airline/vim-airline
      vim-airline/vim-airline-themes
    • 可视化 缩进
      nathanaelkane/vim-indent-guides
    • 行尾 空格(快捷删除)
      bronson/vim-trailing-whitespace
    • 多光标编辑
      terryma/vim-multiple-cursors
    • 自动 补全符号(单引号、双引号、括号等)
      raimondi/delimitmate
    • 快速 加环绕符号(单引号/双引号/括号/成对标签等)
      tpope/vim-surround
    • 代码注释
      scrooloose/nerdcommenter
    • 括号高亮
      kien/rainbow_parentheses.vim
    • 文本对齐/过滤
      godlygeek/tabular
    • 区域选中
      terryma/vim-expand-region
    • PHP语法高亮
      stanangeloff/php.vim
    • HTML5 语法高亮
      othree/html5.vim
    • 自动补全HTML/XML标签
      docunext/closetag.vim
    • Vuejs 组件 语法高亮
      posva/vim-vue
  6. 逐一单个安装

sudo git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/Vundle.vim
sudo git clone https://github.com/altercation/vim-colors-solarized ~/.vim/bundle/vim-colors-solarized
sudo git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline
sudo git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/bundle/vim-airline-themes
sudo git clone https://github.com/nathanaelkane/vim-indent-guides ~/.vim/bundle/vim-indent-guides
sudo git clone https://github.com/bronson/vim-trailing-whitespace ~/.vim/bundle/vim-trailing-whitespace
sudo git clone https://github.com/terryma/vim-multiple-cursors ~/.vim/bundle/vim-multiple-cursors
sudo git clone https://github.com/raimondi/delimitmate ~/.vim/bundle/delimitmate
sudo git clone https://github.com/tpope/vim-surround ~/.vim/bundle/vim-surround
sudo git clone https://github.com/scrooloose/nerdcommenter ~/.vim/bundle/nerdcommenter
sudo git clone https://github.com/kien/rainbow_parentheses.vim ~/.vim/bundle/rainbow_parentheses.vim
sudo git clone https://github.com/godlygeek/tabular ~/.vim/bundle/tabular
sudo git clone https://github.com/terryma/vim-expand-region ~/.vim/bundle/vim-expand-region
sudo git clone https://github.com/stanangeloff/php.vim ~/.vim/bundle/php.vim
sudo git clone https://github.com/othree/html5.vim ~/.vim/bundle/html5.vim
sudo git clone https://github.com/docunext/closetag.vim ~/.vim/bundle/closetag.vim
sudo git clone https://github.com/posva/vim-vue ~/.vim/bundle/vim-vue
  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
要在CentOS 7上安装gVim,有几方法可以选择。一种方法是使用yum安装,另一种方法是从源代码编译安装。 方法1: 使用yum安装 1. 打开终端并以root用户身份登录。 2. 运行以下命令以安装gVim: ``` sudo yum install vim-X11 -y ``` 这将安装gVim及其相关的X11支持。 方法2: 从源代码编译安装 1. 首先,确保你的系统已经安装了编译所需的依赖包。你可以使用以下命令来安装这些依赖包: ``` sudo yum install ncurses-devel.x86_64 sudo yum install libXt-devel.x86_64 sudo yum install gtk2-devel.x86_64 ``` 2. 下载gVim的源代码,并解压到一个目录中。你可以从官方网站下载最新的稳定版本。 3. 打开终端并切换到源代码目录。 4. 运行以下命令以编译和安装gVim: ``` ./configure --with-features=huge \ --enable-gui=gtk2 \ --with-x \ --enable-fontset \ --enable-cscope \ --enable-multibyte \ --enable-pythoninterp \ --with-python-config-dir=/usr/lib64/python2.7/config \ --enable-python3interp \ --with-python3-config-dir=/usr/lib64/python3.6/config \ --enable-luainterp \ --enable-rubyinterp \ --enable-multibyte \ --prefix=/usr \ --with-compiledby="Core-kingdom" make -j8 sudo make install ``` 这将配置、编译和安装gVim到你的系统中。 无论你选择哪种方法,安装完成后,你就可以在CentOS 7上使用gVim了。请注意,对于从源代码编译安装的方法,你可能需要根据你的环境进行一些额外的配置和调整。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值