mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:10:04 +08:00
Update custom config doc
This commit is contained in:
parent
5738064623
commit
b592fe6b8e
@ -2,7 +2,7 @@
|
||||
" SpaceVim.vim --- Initialization and core files for SpaceVim
|
||||
" Copyright (c) 2016-2017 Shidong Wang & Contributors
|
||||
" Author: Shidong Wang < wsdjeg at 163.com >
|
||||
" URL: https://github.com/syl20bnr/spacemacs
|
||||
" URL: https://spacevim.org
|
||||
" License: MIT license
|
||||
"=============================================================================
|
||||
|
||||
|
@ -193,7 +193,7 @@ function! SpaceVim#default#SetMappings() abort
|
||||
nnoremap <silent>[<space> :<c-u>put! =repeat(nr2char(10), v:count1)<cr>
|
||||
nnoremap <silent>]<space> :<c-u>put =repeat(nr2char(10), v:count1)<cr>
|
||||
|
||||
"Use jk switch to normal model
|
||||
"Use jk switch to normal mode
|
||||
inoremap jk <esc>
|
||||
|
||||
"]e or [e move current line ,count can be useed
|
||||
|
@ -180,9 +180,9 @@ Always prefix variables with their scope.
|
||||
- Function-local variables with l:
|
||||
- Vim-predefined variables with v:
|
||||
- Buffer-local variables with b:
|
||||
g:, s:, and a: must always be used.
|
||||
b: changes the variable semantics; use it when you want buffer-local semantics.
|
||||
l: and v: should be used for consistency, future proofing, and to avoid subtle bugs. They are not strictly required. Add them in new code but don’t go out of your way to add them elsewhere.
|
||||
- g:, s:, and a: must always be used.
|
||||
- b: changes the variable semantics; use it when you want buffer-local semantics.
|
||||
- l: and v: should be used for consistency, future proofing, and to avoid subtle bugs. They are not strictly required. Add them in new code but don’t go out of your way to add them elsewhere.
|
||||
|
||||
|
||||
|
||||
|
@ -483,23 +483,55 @@ in the root of your project. `.SpaceVim.d/` will also be added into runtimepath.
|
||||
|
||||
here is an example config file for SpaceVim:
|
||||
|
||||
```viml
|
||||
" set the options of SpaceVim
|
||||
let g:spacevim_colorscheme = 'solarized'
|
||||
```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
|
||||
|
||||
" setting layers, load 'lang#java' layer.
|
||||
call SpaceVim#layers#load('lang#java')
|
||||
" Change the default directory where all miscellaneous persistent files go.
|
||||
" By default it is ~/.cache/vimfiles.
|
||||
let g:spacevim_plugin_bundle_dir = '~/.cache/vimfiles'
|
||||
|
||||
" add custom plugins.
|
||||
" 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'],
|
||||
\ ]
|
||||
|
||||
" custom mappings:
|
||||
nnoremap <c-l> :Ydc<cr>
|
||||
" 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
|
||||
|
Loading…
Reference in New Issue
Block a user