SpaceVim 使用方法
1、Linux或Mac安装
Linux 或 Mac 下 SpaceVim 的安装非常简单,只需要执行以下命令即可:
curl -sLf https://spacevim.org/install.sh | bash
想要获取更多的自定义的安装方式,请参考:
curl -sLf https://spacevim.org/install.sh | bash -s -- -h
2、Windows安装
Windows 下 vim 用户只需要将本仓库克隆成用户 HOME 目录下的 vimfiles 即可,打开 CMD 默彩调民认的目录默认即为 HOME 目录,只需要执行如下命令即可:
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
Windows 下 neovim 用户需要将本仓库克隆成用户 HOME 目录下的 AppData\Local\nvim,想要获取跟多关于 neovim 安装相关的知识,可以访问 neovim 的 wiki, wiki 写的非常详细。打开 CMD 初始目录默认一般即为 HOME 目录,只需要执行如下命令即可:
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
字体SpaceVim 默认启用了 Powerline 字体,默认的字体文件是:DejaVu Sans Mono, Windows 用户直接下载下来右键安装即可。本文所有需要的工具软件都可以在linuxprobe.com上下载到!vimproc.dllWindows 下用户如果宿菌不方便编译,可以在 qq 群文件里面下载相应的 dll 文件放到 vimproc 的 lib 目录,默认是~/.cache/vimfiles/repos/github.com/Shougo/vimproc.vim/lib/
3、用户配置
SpaceVim 将从~/.SpaceVim.d/init.vim和当前目录的./SpaceVim.d/init.vim 载入配置,并且更新 rtp,用户可以在~/.SpaceVim.d/和.SpaceVim.d/这两个文件夹各温下编辑自己的脚本,和 SpaceVim 的配置文件。
示例:
" Here are some basic customizations," please refer to the ~/.SpaceVim.d/init.vim" file for all possible options:let g:spacevim_default_indent = 3let g:spacevim_max_column = 80" Change the default directory where all miscellaneous persistent files go." By default it is ~/.cache/vimfiles.let g:spacevim_plugin_bundle_dir = '~/.cache/vimfiles'" set SpaceVim colorschemelet g:spacevim_colorscheme = 'jellybeans'" Set plugin manager, you want to use, default is dein.vimlet g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug" use space as ``let mapleader = "\"" Set windows shortcut leader [Window], default is `s`let g:spacevim_windows_leader = 's'" Set unite work flow shortcut leader [Unite], default is `f`let g:spacevim_unite_leader = 'f'" By default, language specific plugins are not loaded. This can be changed" with the following, then the plugins for go development will be loaded.call SpaceVim#layers#load('lang#go')" loaded ui layercall SpaceVim#layers#load('ui')" If there is a particular plugin you don't like, you can define this" variable to disable them entirely:let g:spacevim_disabled_plugins=[ \ ['junegunn/fzf.vim'], \ ]" If you want to add some custom plugins, use these options:let g:spacevim_custom_plugins = [ \ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}], \ ['wsdjeg/GitHub.vim'], \ ]" set the guifontlet g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
4、SpaceVim 选项
