Skip to content

Instantly share code, notes, and snippets.

@linw1995
Last active April 17, 2018 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linw1995/0d2f0a4c7bef18ef7c3c4d30e3b7b9cd to your computer and use it in GitHub Desktop.
Save linw1995/0d2f0a4c7bef18ef7c3c4d30e3b7b9cd to your computer and use it in GitHub Desktop.
Install vim with Spacevim and python support.

Install vim with Spacevim and python support.

Install Python with shared libs.

using pyenv to install multi versions of python.

env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.6-dev
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7-dev

load 3.6-dev and 2.7-dev into envirnoment

pyenv global 3.6-dev 2.7-dev

Install vim with python support.

git clone https://github.com/vim/vim
cd vim
./configure --enable-pythoninterp --enable-python3interp
make
sudo make install

run vim --version you can see +python/dyn +python3/dyn

Install SpaceVim

curl -sLf https://spacevim.org/install.sh | bash -s -- --install vim

then execute vim, wait until all plugins installed.

execute :SPUpdate into vim to manual update all plugins.

Install YCM and lang#python support

edit ~/.SpaceVim.d/init.vim

call SpaceVim#layers#load('lang#python')
call SpaceVim#layers#load('autocomplete')
let g:spacevim_enable_ycm = 1

execute vim and wait until all required plugins installed.

then move the cursor on the YCM vebose. execute gf and then you will goto YCM plugin dir. execute ./install.py to build the YCM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment