~/.SpaceVim.d/
will be added to &runtimepath
of vim.
It is also possible to override the location of ~/.SpaceVim.d/
using the environmentvariable SPACEVIMDIR
. Of course you can also use symlinks to change the location ofthis directory.
SpaceVim also support local config file for project, the init file is .SpaceVim.d/init.toml
in the root of your project. .SpaceVim.d/
will also be added into runtimepath.
All SpaceVim options can be found in :h SpaceVim-config
, the key is same asthe option name(just remove g:spacevim_
prefix).
Comprehensive documentation is available for each layer by :h SpaceVim
.
SpaceVim provides two kinds of bootstrap functions for custom configurations and key bindings, namely bootstrap_before
and . To enable it you need to add bootstrap_before = "myspacevim#before"
or bootstrap_after = "myspacevim#after"
to [options]
section in file .SpaceVim.d/init.toml
. The difference is that these two functions will be called before or after the loading of SpaceVim’s main scripts as they named.
The bootstrap functions should be placed to the autoload
directory in runtimepath
, please refer to :h autoload-functions
for further instructions. In our case, create file .SpaceVim.d/autoload/myspacevim.vim
with contents for example
func! myspacevim#before() abort
let g:neomake_enabled_c_makers = ['clang']
endf
iunmap jk
endf
This a list of different key bindings between SpaceVim and origin vim. If you still want to use this origin function, you can enable vimcompatible mode, via vimcompatible = true
in [options]
section.
The , key does repeat last f, F, t and T in vim, but in SpaceVim it is the language specified Leader key.
the option isg:spacevim_enable_language_specific_leader
, default value is 1.The Ctrl + a binding on the command line auto-completes variable names, but in SpaceVim it moves to the cursor to the beginning of the command.
to add the differences you found in this section.
This section is an overview of layers. A more extensive introduction to writing configuration layers can be found in SpaceVim’s layers page (recommended reading!).
Purpose
Layers help collect related packages together to provide features. For example, the lang#python
layer provides auto-completion, syntax checking, and REPL support for python files. This approach helps keep configuration organized and reduces overhead for the user by keeping them from having to think about what packages to install. To install all the python
features the user has just to add the lang#python
layer to their custom configuration file.
Structure
- SpaceVim#layers#autocomplete#plugins(): return a list of plugins used in this plugins.
- SpaceVim#layers#autocomplete#config(): layer config, such as key bindings and autocmds.