美文网首页vim
Mac SpaceVim 安装(version 0.6.0)

Mac SpaceVim 安装(version 0.6.0)

作者: MicoCube | 来源:发表于2018-02-08 11:35 被阅读0次
    • ~/.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 python client?哦,这个插件需要python client

    • 安装clang吧,

    • 官网链接在上边有,没有从源码编译,我下载的是预构建的二进制包【Pre-Built Binaries】,Downloads页面,看网上说只要安装了Xcode就有clang的命令行支持,但是我这电脑没安装Xcode。。。

    • Clang for macOS

    • 解压,配置~/.SpaceVim.d/init.vim添加let g:chromatica#libclang_path='/Users/micocube/clang+llvm-5.0.1/lib'这里的路径就是你将clang解压后的路径,加个lib

    • 最后放上一张图,这就非常的舒服


      SpaceVim

    相关文章

      网友评论

        本文标题:Mac SpaceVim 安装(version 0.6.0)

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