~/.bash_profile
# 偷雞,讓終端運行python的時候調用python3,而不是默認的2.7
alias python='python3'
#GO_HOME
GOROOT=/usr/local/go
export GOROOT
export PATH=$PATH:$GOROOT/bin
GOPATH=/Users/micocube/go
export PATH=$PATH:$GOPATH/bin
#MAVEN_HOME
export M3_HOME=/Users/micocube/Documents/apache-maven-3.5.0
export PATH=$PATH:$M3_HOME/bin
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin
-
安裝和卸載
________________________________________________________________________________ | ~ @ micodeMacBook-Pro (micocube) | => curl -sLf https://spacevim.org/install.sh | bash -s -- -h SpaceVim install script : V 0.6.0 Usage : curl -sLf https://spacevim.org/install.sh | bash -s -- [option] [target] This is bootstrap script for SpaceVim. OPTIONS -i, --install install spacevim for vim or neovim -v, --version Show version information and exit -u, --uninstall Uninstall SpaceVim -c, --checkRequirements checkRequirements for SpaceVim EXAMPLE Install SpaceVim for vim and neovim curl -sLf https://spacevim.org/install.sh | bash Install SpaceVim for vim only or neovim only curl -sLf https://spacevim.org/install.sh | bash -s -- --install vim curl -sLf https://spacevim.org/install.sh | bash -s -- --install neovim Uninstall SpaceVim curl -sLf https://spacevim.org/install.sh | bash -s -- --uninstall ________________________________________________________________________________
brew install neovim
千萬不要用默認的vim,如果你對vim的各種配置不熟的話,一堆莫名奇妙的錯,這個坑可大了vim ~/.SpaceVim.d/init.vim
添加call SpaceVim#layers#load('lang#java')
因為spacevim配置已經自帶了一些語言的支持,c,python,lua,perl,php,rust等,作為一只java狗,我需要java重啟neovim打開一個java文件
emmmmm 報錯了,
Javacomplete needs Python support to run!
什么東西,java怎么還要python?根據這錯誤我搜索到了javacomplete2,
Requirements
里有這么一段話:Vim version 7.4 or above with python support
這是啥,啥support?繼續搜
neovim python support
,搜出來這個build_neovim_with_python3_support,哦,原來neovim是要python的庫支持,雖然不知道是要支持哪個插件,裝了再說pip3 install neovim
重啟
又報錯了
[chromatica] There was an error starting Chromatica. Please check g:chromatica#libclang_path.
老規矩,搜索一波,搜出來個叫chromatica的vim插件在
Essential Settings
下面有一段話
Like many other clang-based plugins, a path to your libclang is needed. Chromatica will default to /usr/lib/libclang.so, but you can specify a different one by setting
let g:chromatica#libclang_path='/usr/local/opt/llvm/lib'
The path can be set to either the path of the libclang.dylib/libclang.so file, or the directory that contains it
-
哦,少編譯器,看Chromatica的Requirements:
- Neovim 0.1.6
- Python3 and Neovim python client
- libclang (prefers 3.9.0, though an older version may work as well)
誒?Neovim python client?哦,這個插件需要python client
安裝clang吧,
官網鏈接在上邊有,沒有從源碼編譯,我下載的是預構建的二進制包【Pre-Built Binaries】,Downloads頁面,看網上說只要安裝了Xcode就有clang的命令行支持,但是我這電腦沒安裝Xcode。。。
解壓,配置
~/.SpaceVim.d/init.vim
添加let g:chromatica#libclang_path='/Users/micocube/clang+llvm-5.0.1/lib'
這里的路徑就是你將clang解壓后的路徑,加個lib-
最后放上一張圖,這就非常的舒服
SpaceVim