From 33326c7852df0be3341dcc2ef83cd9f3bf944db8 Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Tue, 16 Jul 2019 22:05:20 +0800 Subject: [PATCH] Doc help (#2945) --- autoload/SpaceVim/layers/lang/d.vim | 27 +++ autoload/SpaceVim/layers/lang/hack.vim | 27 +++ autoload/SpaceVim/layers/lang/haskell.vim | 28 +++ autoload/SpaceVim/layers/lang/hy.vim | 27 +++ autoload/SpaceVim/layers/lang/nim.vim | 11 + autoload/SpaceVim/layers/lang/pact.vim | 27 +++ autoload/SpaceVim/layers/lang/pony.vim | 9 +- autoload/SpaceVim/layers/lang/racket.vim | 28 +++ config/plugins/vim-airline.vim | 2 +- doc/SpaceVim.txt | 258 +++++++++++++++++++--- test/mode.vader | 3 + 11 files changed, 415 insertions(+), 32 deletions(-) diff --git a/autoload/SpaceVim/layers/lang/d.vim b/autoload/SpaceVim/layers/lang/d.vim index f810e7a29..cd6bd3e24 100644 --- a/autoload/SpaceVim/layers/lang/d.vim +++ b/autoload/SpaceVim/layers/lang/d.vim @@ -6,6 +6,33 @@ " License: GPLv3 "============================================================================= +"" +" @section lang#d, layer-lang-d +" @parentsection layers +" This layer is for d development, disabled by default, to enable this +" layer, add following snippet to your SpaceVim configuration file. +" > +" [[layers]] +" name = 'lang#d' +" < +" +" @subsection Key bindings +" > +" Mode Key Function +" --------------------------------------------- +" normal SPC l r run current file +" < +" +" This layer also provides REPL support for d, the key bindings are: +" > +" Key Function +" --------------------------------------------- +" SPC l s i Start a inferior REPL process +" SPC l s b send whole buffer +" SPC l s l send current line +" SPC l s s send selection text +" < +" function! SpaceVim#layers#lang#d#plugins() abort let plugins = [] diff --git a/autoload/SpaceVim/layers/lang/hack.vim b/autoload/SpaceVim/layers/lang/hack.vim index 8cae3ca31..52e6aea23 100644 --- a/autoload/SpaceVim/layers/lang/hack.vim +++ b/autoload/SpaceVim/layers/lang/hack.vim @@ -6,6 +6,33 @@ " License: GPLv3 "============================================================================= +"" +" @section lang#hack, layer-lang-hack +" @parentsection layers +" This layer is for hack development, disabled by default, to enable this +" layer, add following snippet to your SpaceVim configuration file. +" > +" [[layers]] +" name = 'lang#hack' +" < +" +" @subsection Key bindings +" > +" Mode Key Function +" --------------------------------------------- +" normal SPC l r run current file +" < +" +" This layer also provides REPL support for hack, the key bindings are: +" > +" Key Function +" --------------------------------------------- +" SPC l s i Start a inferior REPL process +" SPC l s b send whole buffer +" SPC l s l send current line +" SPC l s s send selection text +" < +" function! SpaceVim#layers#lang#hack#plugins() abort let plugins = [] diff --git a/autoload/SpaceVim/layers/lang/haskell.vim b/autoload/SpaceVim/layers/lang/haskell.vim index 68d84a535..57de8e6b7 100644 --- a/autoload/SpaceVim/layers/lang/haskell.vim +++ b/autoload/SpaceVim/layers/lang/haskell.vim @@ -6,6 +6,34 @@ " License: GPLv3 "============================================================================= +"" +" @section lang#haskell, layer-lang-haskell +" @parentsection layers +" This layer is for haskell development, disabled by default, to enable this +" layer, add following snippet to your SpaceVim configuration file. +" > +" [[layers]] +" name = 'lang#haskell' +" < +" +" @subsection Key bindings +" > +" Mode Key Function +" --------------------------------------------- +" normal SPC l r run current file +" < +" +" This layer also provides REPL support for haskell, the key bindings are: +" > +" Key Function +" --------------------------------------------- +" SPC l s i Start a inferior REPL process +" SPC l s b send whole buffer +" SPC l s l send current line +" SPC l s s send selection text +" < +" + function! SpaceVim#layers#lang#haskell#plugins() abort let plugins = [ \ ['neovimhaskell/haskell-vim', { 'on_ft': 'haskell' }], diff --git a/autoload/SpaceVim/layers/lang/hy.vim b/autoload/SpaceVim/layers/lang/hy.vim index f19c17f90..6b775481d 100644 --- a/autoload/SpaceVim/layers/lang/hy.vim +++ b/autoload/SpaceVim/layers/lang/hy.vim @@ -6,6 +6,33 @@ " License: GPLv3 "============================================================================= +"" +" @section lang#hy, layer-lang-hy +" @parentsection layers +" This layer is for hy development, disabled by default, to enable this +" layer, add following snippet to your SpaceVim configuration file. +" > +" [[layers]] +" name = 'lang#hy' +" < +" +" @subsection Key bindings +" > +" Mode Key Function +" --------------------------------------------- +" normal SPC l r run current file +" < +" +" This layer also provides REPL support for hy, the key bindings are: +" > +" Key Function +" --------------------------------------------- +" SPC l s i Start a inferior REPL process +" SPC l s b send whole buffer +" SPC l s l send current line +" SPC l s s send selection text +" < +" function! SpaceVim#layers#lang#hy#plugins() abort let plugins = [] diff --git a/autoload/SpaceVim/layers/lang/nim.vim b/autoload/SpaceVim/layers/lang/nim.vim index cf52f4c81..81d5db531 100644 --- a/autoload/SpaceVim/layers/lang/nim.vim +++ b/autoload/SpaceVim/layers/lang/nim.vim @@ -27,6 +27,17 @@ " normal SPC l E rename symbol in project " normal g d go to definition " < +" +" This layer also provides REPL support for nim, the key bindings are: +" > +" Key Function +" --------------------------------------------- +" SPC l s i Start a inferior REPL process +" SPC l s b send whole buffer +" SPC l s l send current line +" SPC l s s send selection text +" < +" function! SpaceVim#layers#lang#nim#plugins() abort diff --git a/autoload/SpaceVim/layers/lang/pact.vim b/autoload/SpaceVim/layers/lang/pact.vim index 8d9e6bb2a..b33da10f6 100644 --- a/autoload/SpaceVim/layers/lang/pact.vim +++ b/autoload/SpaceVim/layers/lang/pact.vim @@ -6,6 +6,33 @@ " License: GPLv3 "============================================================================= +"" +" @section lang#pact, layer-lang-pact +" @parentsection layers +" This layer is for pact development, disabled by default, to enable this +" layer, add following snippet to your SpaceVim configuration file. +" > +" [[layers]] +" name = 'lang#pact' +" < +" +" @subsection Key bindings +" > +" Mode Key Function +" --------------------------------------------- +" normal SPC l r run current file +" < +" +" This layer also provides REPL support for pact, the key bindings are: +" > +" Key Function +" --------------------------------------------- +" SPC l s i Start a inferior REPL process +" SPC l s b send whole buffer +" SPC l s l send current line +" SPC l s s send selection text +" < +" function! SpaceVim#layers#lang#pact#plugins() abort let plugins = [] diff --git a/autoload/SpaceVim/layers/lang/pony.vim b/autoload/SpaceVim/layers/lang/pony.vim index 518dd8524..b2967bff8 100644 --- a/autoload/SpaceVim/layers/lang/pony.vim +++ b/autoload/SpaceVim/layers/lang/pony.vim @@ -9,12 +9,19 @@ "" " @section lang#pony, layer-lang-pony " @parentsection layers -" This layer includes utilities and language-specific mappings for pony development. +" This layer is for pony development, disabled by default, to enable this +" layer, add following snippet to your SpaceVim configuration file. " > " [[layers]] " name = 'lang#pony' " < " +" @subsection Key bindings +" > +" Mode Key Function +" --------------------------------------------- +" normal SPC l r run current file +" < function! SpaceVim#layers#lang#pony#plugins() abort let plugins = [] diff --git a/autoload/SpaceVim/layers/lang/racket.vim b/autoload/SpaceVim/layers/lang/racket.vim index 003fef601..ca233960c 100644 --- a/autoload/SpaceVim/layers/lang/racket.vim +++ b/autoload/SpaceVim/layers/lang/racket.vim @@ -6,6 +6,34 @@ " License: GPLv3 "============================================================================= +"" +" @section lang#racket, layer-lang-racket +" @parentsection layers +" This layer is for racket development, disabled by default, to enable this +" layer, add following snippet to your SpaceVim configuration file. +" > +" [[layers]] +" name = 'lang#racket' +" < +" +" @subsection Key bindings +" > +" Mode Key Function +" --------------------------------------------- +" normal SPC l r run current file +" < +" +" This layer also provides REPL support for racket, the key bindings are: +" > +" Key Function +" --------------------------------------------- +" SPC l s i Start a inferior REPL process +" SPC l s b send whole buffer +" SPC l s l send current line +" SPC l s s send selection text +" < +" + function! SpaceVim#layers#lang#racket#plugins() abort let plugins = [] call add(plugins, ['wlangstroth/vim-racket', {'merged' : 0}]) diff --git a/config/plugins/vim-airline.vim b/config/plugins/vim-airline.vim index 8dd823971..a970d39cc 100644 --- a/config/plugins/vim-airline.vim +++ b/config/plugins/vim-airline.vim @@ -4,7 +4,7 @@ let g:airline_skip_empty_sections = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tmuxline#enabled = 1 let g:Powerline_sybols = 'unicode' -if g:spacevim_buffer_index_type < 3 +if get(g:, 'spacevim_buffer_index_type', 1) < 3 let g:airline#extensions#tabline#buffer_idx_mode = 1 let g:airline#extensions#tabline#buffer_idx_format = {} for s:i in range(9) diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index a263cda00..eb1b8fcfa 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -81,34 +81,40 @@ CONTENTS *SpaceVim-contents* 11. lang#c.......................................|SpaceVim-layer-lang-c| 12. lang#crystal...........................|SpaceVim-layer-lang-crystal| 13. lang#csharp.............................|SpaceVim-layer-lang-csharp| - 14. lang#dart.................................|SpaceVim-layer-lang-dart| - 15. lang#elixir.............................|SpaceVim-layer-lang-elixir| - 16. lang#elm...................................|SpaceVim-layer-lang-elm| - 17. lang#go.....................................|SpaceVim-layer-lang-go| - 18. lang#groovy.............................|SpaceVim-layer-lang-groovy| - 19. lang#java.................................|SpaceVim-layer-lang-java| - 20. lang#julia...............................|SpaceVim-layer-lang-julia| - 21. lang#kotlin.............................|SpaceVim-layer-lang-kotlin| - 22. lang#livescript.....................|SpaceVim-layer-lang-livescript| - 23. lang#lua...................................|SpaceVim-layer-lang-lua| - 24. lang#nim...................................|SpaceVim-layer-lang-nim| - 25. lang#ocaml...............................|SpaceVim-layer-lang-ocaml| - 26. lang#php...................................|SpaceVim-layer-lang-php| - 27. lang#pony.................................|SpaceVim-layer-lang-pony| - 28. lang#processing.....................|SpaceVim-layer-lang-processing| - 29. lang#prolog.............................|SpaceVim-layer-lang-prolog| - 30. lang#puppet.............................|SpaceVim-layer-lang-puppet| - 31. lang#python.............................|SpaceVim-layer-lang-python| - 32. lang#rust.................................|SpaceVim-layer-lang-rust| - 33. lang#scala...............................|SpaceVim-layer-lang-scala| - 34. lang#tcl...................................|SpaceVim-layer-lang-tcl| - 35. lang#xml...................................|SpaceVim-layer-lang-xml| - 36. operator...................................|SpaceVim-layer-operator| - 37. shell.........................................|SpaceVim-layer-shell| - 38. test...........................................|SpaceVim-layer-test| - 39. tmux...........................................|SpaceVim-layer-tmux| - 40. tools#dash...............................|SpaceVim-layer-tools-dash| - 41. tools#zeal...............................|SpaceVim-layer-tools-zeal| + 14. lang#d.......................................|SpaceVim-layer-lang-d| + 15. lang#dart.................................|SpaceVim-layer-lang-dart| + 16. lang#elixir.............................|SpaceVim-layer-lang-elixir| + 17. lang#elm...................................|SpaceVim-layer-lang-elm| + 18. lang#go.....................................|SpaceVim-layer-lang-go| + 19. lang#groovy.............................|SpaceVim-layer-lang-groovy| + 20. lang#hack.................................|SpaceVim-layer-lang-hack| + 21. lang#haskell...........................|SpaceVim-layer-lang-haskell| + 22. lang#hy.....................................|SpaceVim-layer-lang-hy| + 23. lang#java.................................|SpaceVim-layer-lang-java| + 24. lang#julia...............................|SpaceVim-layer-lang-julia| + 25. lang#kotlin.............................|SpaceVim-layer-lang-kotlin| + 26. lang#livescript.....................|SpaceVim-layer-lang-livescript| + 27. lang#lua...................................|SpaceVim-layer-lang-lua| + 28. lang#nim...................................|SpaceVim-layer-lang-nim| + 29. lang#ocaml...............................|SpaceVim-layer-lang-ocaml| + 30. lang#pact.................................|SpaceVim-layer-lang-pact| + 31. lang#php...................................|SpaceVim-layer-lang-php| + 32. lang#pony.................................|SpaceVim-layer-lang-pony| + 33. lang#processing.....................|SpaceVim-layer-lang-processing| + 34. lang#prolog.............................|SpaceVim-layer-lang-prolog| + 35. lang#puppet.............................|SpaceVim-layer-lang-puppet| + 36. lang#python.............................|SpaceVim-layer-lang-python| + 37. lang#racket.............................|SpaceVim-layer-lang-racket| + 38. lang#rust.................................|SpaceVim-layer-lang-rust| + 39. lang#scala...............................|SpaceVim-layer-lang-scala| + 40. lang#tcl...................................|SpaceVim-layer-lang-tcl| + 41. lang#xml...................................|SpaceVim-layer-lang-xml| + 42. operator...................................|SpaceVim-layer-operator| + 43. shell.........................................|SpaceVim-layer-shell| + 44. test...........................................|SpaceVim-layer-test| + 45. tmux...........................................|SpaceVim-layer-tmux| + 46. tools#dash...............................|SpaceVim-layer-tools-dash| + 47. tools#zeal...............................|SpaceVim-layer-tools-zeal| 7. API........................................................|SpaceVim-api| 1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu| 2. data#dict....................................|SpaceVim-api-data-dict| @@ -1377,6 +1383,35 @@ KEY MAPPINGS normal SPC l s S stop the OmniSharp server < +============================================================================== +LANG#D *SpaceVim-layer-lang-d* + +This layer is for d development, disabled by default, to enable this layer, +add following snippet to your SpaceVim configuration file. +> + [[layers]] + name = 'lang#d' +< + +KEY BINDINGS + +> + Mode Key Function + --------------------------------------------- + normal SPC l r run current file +< + +This layer also provides REPL support for d, the key bindings are: +> + Key Function + --------------------------------------------- + SPC l s i Start a inferior REPL process + SPC l s b send whole buffer + SPC l s l send current line + SPC l s s send selection text +< + + ============================================================================== LANG#DART *SpaceVim-layer-lang-dart* @@ -1464,6 +1499,93 @@ This layer also provides REPL support for groovy, the key bindings are: < +============================================================================== +LANG#HACK *SpaceVim-layer-lang-hack* + +This layer is for hack development, disabled by default, to enable this layer, +add following snippet to your SpaceVim configuration file. +> + [[layers]] + name = 'lang#hack' +< + +KEY BINDINGS + +> + Mode Key Function + --------------------------------------------- + normal SPC l r run current file +< + +This layer also provides REPL support for hack, the key bindings are: +> + Key Function + --------------------------------------------- + SPC l s i Start a inferior REPL process + SPC l s b send whole buffer + SPC l s l send current line + SPC l s s send selection text +< + + +============================================================================== +LANG#HASKELL *SpaceVim-layer-lang-haskell* + +This layer is for haskell development, disabled by default, to enable this +layer, add following snippet to your SpaceVim configuration file. +> + [[layers]] + name = 'lang#haskell' +< + +KEY BINDINGS + +> + Mode Key Function + --------------------------------------------- + normal SPC l r run current file +< + +This layer also provides REPL support for haskell, the key bindings are: +> + Key Function + --------------------------------------------- + SPC l s i Start a inferior REPL process + SPC l s b send whole buffer + SPC l s l send current line + SPC l s s send selection text +< + + +============================================================================== +LANG#HY *SpaceVim-layer-lang-hy* + +This layer is for hy development, disabled by default, to enable this layer, +add following snippet to your SpaceVim configuration file. +> + [[layers]] + name = 'lang#hy' +< + +KEY BINDINGS + +> + Mode Key Function + --------------------------------------------- + normal SPC l r run current file +< + +This layer also provides REPL support for hy, the key bindings are: +> + Key Function + --------------------------------------------- + SPC l s i Start a inferior REPL process + SPC l s b send whole buffer + SPC l s l send current line + SPC l s s send selection text +< + + ============================================================================== LANG#JAVA *SpaceVim-layer-lang-java* @@ -1639,6 +1761,17 @@ KEY BINDINGS normal g d go to definition < +This layer also provides REPL support for nim, the key bindings are: +> + Key Function + --------------------------------------------- + SPC l s i Start a inferior REPL process + SPC l s b send whole buffer + SPC l s l send current line + SPC l s s send selection text +< + + ============================================================================== LANG#OCAML *SpaceVim-layer-lang-ocaml* @@ -1650,6 +1783,35 @@ Requirements: merlin < +============================================================================== +LANG#PACT *SpaceVim-layer-lang-pact* + +This layer is for pact development, disabled by default, to enable this layer, +add following snippet to your SpaceVim configuration file. +> + [[layers]] + name = 'lang#pact' +< + +KEY BINDINGS + +> + Mode Key Function + --------------------------------------------- + normal SPC l r run current file +< + +This layer also provides REPL support for pact, the key bindings are: +> + Key Function + --------------------------------------------- + SPC l s i Start a inferior REPL process + SPC l s b send whole buffer + SPC l s l send current line + SPC l s s send selection text +< + + ============================================================================== LANG#PHP *SpaceVim-layer-lang-php* @@ -1659,13 +1821,20 @@ checking, and jump to definition. ============================================================================== LANG#PONY *SpaceVim-layer-lang-pony* -This layer includes utilities and language-specific mappings for pony -development. +This layer is for pony development, disabled by default, to enable this layer, +add following snippet to your SpaceVim configuration file. > [[layers]] name = 'lang#pony' < +KEY BINDINGS + +> + Mode Key Function + --------------------------------------------- + normal SPC l r run current file +< ============================================================================== LANG#PROCESSING *SpaceVim-layer-lang-processing* @@ -1723,6 +1892,35 @@ MAPPINGS mode key function < +============================================================================== +LANG#RACKET *SpaceVim-layer-lang-racket* + +This layer is for racket development, disabled by default, to enable this +layer, add following snippet to your SpaceVim configuration file. +> + [[layers]] + name = 'lang#racket' +< + +KEY BINDINGS + +> + Mode Key Function + --------------------------------------------- + normal SPC l r run current file +< + +This layer also provides REPL support for racket, the key bindings are: +> + Key Function + --------------------------------------------- + SPC l s i Start a inferior REPL process + SPC l s b send whole buffer + SPC l s l send current line + SPC l s s send selection text +< + + ============================================================================== LANG#RUST *SpaceVim-layer-lang-rust* diff --git a/test/mode.vader b/test/mode.vader index 02c303f0e..725814bdf 100644 --- a/test/mode.vader +++ b/test/mode.vader @@ -3,3 +3,6 @@ Execute ( SpaceVim mode ): let basic = toml.parse_file('mode/basic.toml') let dark = toml.parse_file('mode/dark_powered.toml') AssertEqual basic.options.statusline_separator, 'nil' + unlet toml + unlet basic + unlet dark