zoukankan      html  css  js  c++  java
  • CentOS7 升级 gvim 到 8.x 版本

    因为 CentOS7 在默认情况下,通过 yum 安装的 vim-X11.x86_64 版本为 7.x 版本,对 Youcompleteme 支持不好。故需要升级到 8.x 版本。

    以下记录 gvim 源码安装过程:

    0. 卸载原始的安装包 vim-X11

    $ sudo yum remove vim-X11.x86_64 

    1. 安装必要的软件包 (主要是为了支持 X,首先可用 $ rpm -qa xxx 查看是否这些包已经安装)

    $ sudo yum install ncurses-devel.x86_64
    $ sudo yum install libXt-devel.x86_64
    $ sudo yum install gtk2-devel.x86_64

    2. clone 源码包

    $ git clone https://github.com/vim/vim.git

    3. 进入源码目录进行编译前配置 (可用 $ ./configure --help 查看可用的编译选项)

    $ ./configure --prefix=/usr/local --enable-pythoninterp=yes --enable-gui=auto --enable-cscope --enable-multibyte --enable-xim --enable-fontset --with-features=huge --with-x 

    4. 编译

    $ make

    5. 安装

    $ sudo make install

    6. 问题

    github 最新的 vim8.1 可能出现在 GUI 情况下 Ctrl + F 不能正确翻页的问题,Linux 下解决方法如下,

    打开文件: /usr/local/share/vim/vim81/mswin.vim

    把如下的黄色部分注释掉即可,

    if has("gui")
      "" CTRL-F is the search dialog
      "noremap  <expr> <C-F> has("gui_running") ? ":promptfind<CR>" : "/"
      "inoremap <expr> <C-F> has("gui_running") ? "<C-><C-O>:promptfind<CR>" : "<C-><C-O>/"
      "cnoremap <expr> <C-F> has("gui_running") ? "<C-><C-C>:promptfind<CR>" : "<C-><C-O>/"
    
      " CTRL-H is the replace dialog,
      " but in console, it might be backspace, so don't map it there
      nnoremap <expr> <C-H> has("gui_running") ? ":promptrepl<CR>" : "<C-H>"
      inoremap <expr> <C-H> has("gui_running") ? "<C-><C-O>:promptrepl<CR>" : "<C-H>"
      cnoremap <expr> <C-H> has("gui_running") ? "<C-><C-C>:promptrepl<CR>" : "<C-H>"
    endif

    完。

     

  • 相关阅读:
    arcpy脚本使用多接图表图斑对对应多幅影像进行裁边处理
    小辉轶事
    一些常ArcGIS常用简单算法 C#
    Wowza 4.5 修改 manager 端口号
    win7x64 串口程序无法运行,提示:component 'MSCOMM32.OCX' or one of its dependencies not correctlu registered。。。
    win7不正常开关机,系统恢复选项
    远程桌面+程序自启动
    Beyond Compare4 激活
    edusoho 支持同一账号多人同时登录
    windows 2008 gpt
  • 原文地址:https://www.cnblogs.com/gaowengang/p/10546815.html
Copyright © 2011-2022 走看看