1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:30:03 +08:00

Update doc

This commit is contained in:
wsdjeg 2017-04-30 14:43:09 +08:00
parent 5e4c34aedf
commit 669f9cba55

View File

@ -22,7 +22,7 @@ title: "Documentation"
- [Update plugins](#update-plugins)
- [Custom Configuration](#custom-configuration)
[Automatic Generation](#automatic-generation)
[Alternative dotdirectory](#alternative-dotdirectory)
[Alternative directory](#alternative-directory)
[Synchronization of dotfile changes](#synchronization-of-dotfile-changes)
Testing the dotfile
[Dotfile Contents](#dotfile-contents)
@ -130,29 +130,66 @@ User configuration can be stored in your ~/.SpaceVim.d directory.
The very first time SpaceVim starts up, it will ask you several questions and then create the `SpaceVim.d/init.vim` in your `HOME` directory.
### Alternative dotdirectory
### Alternative directory
### Synchronization of dotfile changes
`~/.SpaceVim.d/` will be added to `&runtimepath` of vim. read <kbd>:h rtp</kbd>.
### Testing the dotfile
It is also possible to override the location of `~/.SpaceVim.d/` using the environment variable `SPACEVIMDIR`. Of course you can also use symlinks to change the location of this directory.
### Dotfile Contents
SpaceVim also support local config file for project, the init file is `.SpaceVim.d/init.vim`
in the root of your project. `.SpaceVim.d/` will also be added into runtimepath.
#### Configuration functions
here is an example config file for SpaceVim:
#### Custom variables
```vim
" Here are some basic customizations, please refer to the ~/.SpaceVim.d/init.vim
" file for all possible options:
let g:spacevim_default_indent = 3
let g:spacevim_max_column = 80
### Declaring Configuration layers
" Change the default directory where all miscellaneous persistent files go.
" By default it is ~/.cache/vimfiles.
let g:spacevim_plugin_bundle_dir = '~/.cache/vimfiles'
#### Setting configuration layers variables
" set SpaceVim colorscheme
let g:spacevim_colorscheme = 'jellybeans'
#### Disabling layer services in other layers
" Set plugin manager, you want to use, default is dein.vim
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
#### Selecting/Ignoring packages of a layer
" use space as `<Leader>`
let mapleader = "\<space>"
#### Excluding packages
" 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 layer
call 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 guifont
let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
```
Comprehensive documentation is available for each layer by <kbd>:h SpaceVim</kbd>.
# Features
@ -632,65 +669,6 @@ Key | Mode | Action
`<leader>`+`W` | Normal | Wiki
`<leader>`+`K` | Normal | Thesaurus
#### Custom configuration
SpaceVim use `~/.SpaceVim.d/init.vim` as default global init file. you can set
SpaceVim-options or config layers in it. SpaceVim also will add `~/.SpaceVim.d/`
into runtimepath. so you can write your own vim script in it.
SpaceVim also support local config file for project, the init file is `.SpaceVim.d/init.vim`
in the root of your project. `.SpaceVim.d/` will also be added into runtimepath.
here is an example config file for SpaceVim:
```vim
" Here are some basic customizations, please refer to the ~/.SpaceVim.d/init.vim
" file for all possible options:
let g:spacevim_default_indent = 3
let 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 colorscheme
let g:spacevim_colorscheme = 'jellybeans'
" Set plugin manager, you want to use, default is dein.vim
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
" use space as `<Leader>`
let mapleader = "\<space>"
" 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 layer
call 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 guifont
let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
```
Comprehensive documentation is available for each layer by <kbd>:h SpaceVim</kbd>.
<!-- plublic links -->
[dein.vim]: https://github.com/Shougo/dein.vim