美文网首页Vim我用 LinuxLinux学习之路
Setup VIM8+SpaceVIM on Ubuntu 16

Setup VIM8+SpaceVIM on Ubuntu 16

作者: qingguee | 来源:发表于2017-07-16 21:29 被阅读341次

    VIM8+SpaceVIM

    本文记录了如何在ubuntu16.04 上编译vim8(python3+,lua+),然后安装SpaceVIM.
    SpaceVIM可以被看作是一个开箱即用的vim插件发行版本,值得推荐。
    https://spacevim.org/

    image.png

    为什么要装vim8+spacevim

    装vim8是因为8.0确实多了很多特性,支持异步等等等。
    装SpaceVIM是因为折腾累了,这个用起来还不错。
    但是请谨记:工具本来的目的是提高工作效率,过度的学习就使它失去了意义。这个需要自己去平衡。


    Install VIM8 (Manual )

    OS: Ubuntu 16.04.2

    1. Clone vim source code
    git clone https://github.com/vim/vim.git  vm8  
    cd vim8/src 
    
    1. Install dependence packages
    sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev \
    libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev \
    ruby-dev lua5.1 lua5.1- dev libperl-dev git libncurses5-dev libncursesw5-dev
    
    
    1. [Alternative 1]Configure with Python3+
    ./configure --with-features=huge \
              --enable-multibyte \
              --enable-rubyinterp=yes \
              --enable-python3interp=yes \
              --with-python-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu \
              --enable-perlinterp=yes \
              --enable-luainterp=yes \
              --enable-cscope --prefix=/usr \
              --enable-fail-if-missing          
    
    1. [Alternative 2]Configure with Python2+
    ./configure --with-features=huge \
              --enable-multibyte \
              --enable-rubyinterp=yes \
              --enable-pythoninterp=yes \
              --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
              --enable-perlinterp=yes \
              --enable-luainterp=yes \
              --enable-cscope --prefix=/usr \
              --enable-fail-if-missing
    
    1. Remove vim7 packages. This may cause some problem when using spacevim, remove them then install vim8.
    sudo apt list --installed|grep vim                     
    sudo apt remove vim-*                                                                                                                                                                                       
    
    1. Install vim8
    sudo make install
    vim --version
    

    Install SpaceVIM

    1. Install SpaceVIM
    curl -sLf https://spacevim.org/install.sh | bash
    
    1. Install Powerline font
    # clone
    git clone https://github.com/powerline/fonts.git
    # install
    cd fonts
    ./install.sh
    # clean-up a bit
    cd ..
    rm -rf fonts
    
    1. Configure terminal with powerline font
      Open Terminal --> Perfermance --> profile --> Edite --> General --> Custom font
      Select a Powerfont that you like. For example, Noto Mono for Powerline Regular
    image.png

    Start VIM8 and install plugs

    1. Start vim then it will install all plugs. And Select "Dark powered mode"
    vim
    

    Read help for SpaceVim

    Get spacevime help doc in vim.

    :h Spacevim
    

    相关文章

      网友评论

      • wildbook:支持剪切板嘛?
        wildbook: @书书曾 嗯嗯,那我有空再重新转下
        qingguee: @wildbook spacevim是有插件支持的。我个人比较懒,如果vim外的cp,paste,我都直接按着shift+鼠标右键。

      本文标题:Setup VIM8+SpaceVIM on Ubuntu 16

      本文链接:https://www.haomeiwen.com/subject/nudxkxtx.html