From b592fe6b8e98cc11a3d0e4a828788d48f08ac109 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Mon, 6 Mar 2017 23:39:03 +0800 Subject: [PATCH] Update custom config doc --- README.md | 6 ++-- autoload/SpaceVim.vim | 2 +- autoload/SpaceVim/default.vim | 2 +- docs/development/conventions.md | 6 ++-- docs/documentation.md | 54 ++++++++++++++++++++++++++------- 5 files changed, 51 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index cd86529e1..9bb1b5188 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ If you are new to vim, you should learning about Vim in general, read [vim-galor ### Quick start guide -SpaceVim load custom configuration from `~/.SpaceVim.d/init.vim`, +SpaceVim load custom configuration from `~/.SpaceVim.d/init.vim`, :warning: It is not `~/.SpaceVim/init.vim`, user should not change anything in `~/.SpaceVim/`. @@ -182,9 +182,9 @@ The best way to support SpaceVim is to contribute to it either by reporting bugs If you want to show your support financially you can contribute to [Bountysource](https://www.bountysource.com/teams/spacevim) or buy a drink for the maintainer by clicking following icon. -Buy Me a Coffee at ko-fi.com +Buy Me a Coffee at ko-fi.com -If you used SpaceVim in a project and you want to show that fact, you can use the SpaceVim badge: +If you used SpaceVim in a project and you want to show that fact, you can use the SpaceVim badge: [![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org) diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 44916a0db..b7196c363 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -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 "============================================================================= diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 04fb5fc6c..8a2719d09 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -193,7 +193,7 @@ function! SpaceVim#default#SetMappings() abort nnoremap [ :put! =repeat(nr2char(10), v:count1) nnoremap ] :put =repeat(nr2char(10), v:count1) - "Use jk switch to normal model + "Use jk switch to normal mode inoremap jk "]e or [e move current line ,count can be useed diff --git a/docs/development/conventions.md b/docs/development/conventions.md index 6cc330f42..75a9b8e87 100644 --- a/docs/development/conventions.md +++ b/docs/development/conventions.md @@ -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. diff --git a/docs/documentation.md b/docs/documentation.md index 9eb4052ab..9da458d68 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -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 `` +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 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'], - \ ] + \ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}], + \ ['wsdjeg/GitHub.vim'], + \ ] - " custom mappings: - nnoremap :Ydc +" set the guifont +let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11' ``` +Comprehensive documentation is available for each layer by :h SpaceVim. [dein.vim]: https://github.com/Shougo/dein.vim