From b72e2d52cbff430d2029952b2e8c002238c1a9b1 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sat, 28 Jan 2017 19:54:50 +0800 Subject: [PATCH 01/40] Add table of contents --- README.md | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1cecf9c85..456912565 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,30 @@  +### Table of Contents +- Introduction +- Install + - Linux/Mac + - Windows +- Features + - Neovim-centric + - [Modular configuration](#modular-configuration) + - [multiple leader mode](#multiple-leader-mode) + - Lazy-load 90% of plugins with [dein.vim] + - Robust, yet light weight + - [Unite centric work-flow](#unite-centric-work-flow) + - [Awesome ui](#awesome-ui) + - [Language specific mode](#language-specific-mode) + - Extensive Neocomplete setup + - Central location for tags + - Lightweight simple status/tabline + - Premium color-schemes +- Custom configuration +- Support SpaceVim + - contribute to SpaceVim + - Write post about SpaceVim + - Report bugs + [SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim, here we call them layers, each layer has different plugins and config, user just need to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim, @@ -30,6 +54,8 @@ For learning about Vim in general, read [vim-galore](https://github.com/mhinz/vi #### Install +#### Linux/Mac + ```sh curl -sLf https://spacevim.org/install.sh | bash ``` @@ -64,22 +90,7 @@ git clone https://github.com/SpaceVim/SpaceVim.git vimfiles git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ``` -#### Features - -- Neovim-centric -- [Modular configuration](#modular-configuration) -- [multiple leader mode](#multiple-leader-mode) -- Lazy-load 90% of plugins with [dein.vim] -- Robust, yet light weight -- [Unite centric work-flow](#unite-centric-work-flow) -- [Awesome ui](#awesome-ui) -- [Language specific mode](#language-specific-mode) -- Extensive Neocomplete setup -- Central location for tags -- Lightweight simple status/tabline -- Premium color-schemes - -#### Structure +#### File Structure - [config](./config)/ - Configuration - [plugins](./config/plugins)/ - Plugin configurations - [mappings.vim](./config/mappings.vim) - Key mappings From db011a5747eb643ec591f52eb33f01659136e06c Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sat, 28 Jan 2017 22:32:17 +0800 Subject: [PATCH 02/40] Add custom config --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 456912565..c6868b338 100644 --- a/README.md +++ b/README.md @@ -549,6 +549,32 @@ Key | Mode | Action `<leader>`+`W` | Normal | Wiki `<leader>`+`K` | Normal | Thesaurus +#### Custom configuration +SpaceVim use `~/.SpaceVim.d/init.vim` as defalut 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: +```viml +" set the options of SpaceVim +let g:spacevim_colorscheme = 'solarized' + +" setting layers, load 'lang#java' layer. +call SpaceVim#layers#load('lang#java') + +" add custom plugins. +let g:spacevim_custom_plugins = [ + \ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}], + \ ['wsdjeg/GitHub.vim'], + \ ] + + " custom mappings: + nnoremap <c-l> :Ydc<cr> +``` + #### Enjoy! #### Credits & Thanks From b18671e3ed31dcf5769070063af71ba3caa44081 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sat, 28 Jan 2017 23:03:40 +0800 Subject: [PATCH 03/40] Update table --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c6868b338..88dfde6c2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -<p align="center"><img src="logo.jpg" alt="SpaceVim"/></p> +<p align="center"><img src="https://github.com/SpaceVim/SpaceVim/raw/table/logo.jpg" alt="SpaceVim"/></p> [](https://travis-ci.org/SpaceVim/SpaceVim)  @@ -16,10 +16,10 @@  ### Table of Contents -- Introduction -- Install - - Linux/Mac - - Windows +- [Introduction](#introduction) +- [Install](#install) + - [Linux/Mac](#linuxmac) + - [Windows support](#windows-support) - Features - Neovim-centric - [Modular configuration](#modular-configuration) @@ -39,6 +39,8 @@ - Write post about SpaceVim - Report bugs +#### Introduction + [SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim, here we call them layers, each layer has different plugins and config, user just need to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim, From 5af360c5e6b4f1198c42753a3ca7ff6e80811a1f Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sat, 28 Jan 2017 23:11:29 +0800 Subject: [PATCH 04/40] Add dark powerd mode --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88dfde6c2..e28484819 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ - [Install](#install) - [Linux/Mac](#linuxmac) - [Windows support](#windows-support) +- [File Structure](#file-structure) - Features - Neovim-centric - [Modular configuration](#modular-configuration) @@ -56,7 +57,7 @@ For learning about Vim in general, read [vim-galore](https://github.com/mhinz/vi #### Install -#### Linux/Mac +##### Linux/Mac ```sh curl -sLf https://spacevim.org/install.sh | bash @@ -110,7 +111,12 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim - [init.vim](./init.vim) - Sources `config/main.vim` - [vimrc](./vimrc) - Sources `config/main.vim` -#### Modular configuration + +#### Features + +##### Neovim centric - Dark powered mode of SpaceVim. + +##### Modular configuration - SpaceVim will load custom configuration from `~/.local.vim` and `.local.vim` in current directory. - SpaceVim support `~/.SpaceVim.d/init.vim` and `./SpaceVim.d/init.vim`. From 26a8533dd68216eb746151f120f77133b9e44789 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sat, 28 Jan 2017 23:26:57 +0800 Subject: [PATCH 05/40] Add deo links --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e28484819..f2c5cbaad 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ - [Windows support](#windows-support) - [File Structure](#file-structure) - Features - - Neovim-centric + - [Neovim centric - Dark powered mode](#neovim-centric---dark-powered-mode-of-spacevim) - [Modular configuration](#modular-configuration) - [multiple leader mode](#multiple-leader-mode) - Lazy-load 90% of plugins with [dein.vim] @@ -116,6 +116,14 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ##### Neovim centric - Dark powered mode of SpaceVim. +By defalut, SpaceVim use these dark powered plugins: +1. Dark powered asynchronous completion framework for neovim - - [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) +2. Dark powered Vim/Neovim plugin manager - - - - - - - - - - - - [dein.vim](https://github.com/Shougo/dein.vim) +TODO: +1. Dark powered file explorer - - - - - - - - - - - - - - - - - - [defx.nvim](https://github.com/Shougo/defx.nvim) +2. Dark powered snippet plugin - - - - - - - - - - - - - - - - - [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) +3. Dark powered asynchronous unite all interfaces for Neovim/Vim8 [denite.nvim](https://github.com/Shougo/denite.nvim) + ##### Modular configuration - SpaceVim will load custom configuration from `~/.local.vim` and `.local.vim` in current directory. From 3f385fbae5c2db0ba116bfbe53e4e7a901b09caa Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sat, 28 Jan 2017 23:27:48 +0800 Subject: [PATCH 06/40] Fix menu --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f2c5cbaad..0905affb4 100644 --- a/README.md +++ b/README.md @@ -117,9 +117,12 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ##### Neovim centric - Dark powered mode of SpaceVim. By defalut, SpaceVim use these dark powered plugins: + 1. Dark powered asynchronous completion framework for neovim - - [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) 2. Dark powered Vim/Neovim plugin manager - - - - - - - - - - - - [dein.vim](https://github.com/Shougo/dein.vim) + TODO: + 1. Dark powered file explorer - - - - - - - - - - - - - - - - - - [defx.nvim](https://github.com/Shougo/defx.nvim) 2. Dark powered snippet plugin - - - - - - - - - - - - - - - - - [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) 3. Dark powered asynchronous unite all interfaces for Neovim/Vim8 [denite.nvim](https://github.com/Shougo/denite.nvim) From 3625086b0e7f47c9dd42fed87c35ddcbe196ce9d Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sat, 28 Jan 2017 23:36:07 +0800 Subject: [PATCH 07/40] Update deo part --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0905affb4..fa83e90eb 100644 --- a/README.md +++ b/README.md @@ -118,14 +118,14 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim By defalut, SpaceVim use these dark powered plugins: -1. Dark powered asynchronous completion framework for neovim - - [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) -2. Dark powered Vim/Neovim plugin manager - - - - - - - - - - - - [dein.vim](https://github.com/Shougo/dein.vim) +1. [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) - Dark powered asynchronous completion framework for neovim +2. [dein.vim](https://github.com/Shougo/dein.vim) - Dark powered Vim/Neovim plugin manager TODO: -1. Dark powered file explorer - - - - - - - - - - - - - - - - - - [defx.nvim](https://github.com/Shougo/defx.nvim) -2. Dark powered snippet plugin - - - - - - - - - - - - - - - - - [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) -3. Dark powered asynchronous unite all interfaces for Neovim/Vim8 [denite.nvim](https://github.com/Shougo/denite.nvim) +1. [defx.nvim](https://github.com/Shougo/defx.nvim) - Dark powered file explorer +2. [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) - Dark powered snippet plugin +3. [denite.nvim](https://github.com/Shougo/denite.nvim) - Dark powered asynchronous unite all interfaces for Neovim/Vim8 ##### Modular configuration From 7a94975f55c81d1cce77b75d3805c975f749223b Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sun, 29 Jan 2017 21:11:31 +0800 Subject: [PATCH 08/40] Fix git layer --- README.md | 1 - autoload/SpaceVim/layers/git.vim | 6 +++++- config/plugins/unite-gtags.vim | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1cecf9c85..5b0d4b652 100644 --- a/README.md +++ b/README.md @@ -513,7 +513,6 @@ Key | Mode | Action `<leader>`+`gd` | Normal | Git diff `<leader>`+`gc` | Normal | Git commit `<leader>`+`gb` | Normal | Git blame -`<leader>`+`gB` | Normal | Open in browser `<leader>`+`gp` | Normal | Git push ##### Plugin: GitGutter diff --git a/autoload/SpaceVim/layers/git.vim b/autoload/SpaceVim/layers/git.vim index 0c8c51170..2f2244d1b 100644 --- a/autoload/SpaceVim/layers/git.vim +++ b/autoload/SpaceVim/layers/git.vim @@ -10,5 +10,9 @@ endfunction function! SpaceVim#layers#git#config() abort - + nnoremap <silent> <Leader>gs :Gita status<CR> + nnoremap <silent> <Leader>gd :Gita diff<CR> + nnoremap <silent> <Leader>gc :Gita commit<CR> + nnoremap <silent> <Leader>gb :Gita blame<CR> + nnoremap <silent> <Leader>gp :Gita push<CR> endfunction diff --git a/config/plugins/unite-gtags.vim b/config/plugins/unite-gtags.vim index bd38a3c02..9105f092d 100644 --- a/config/plugins/unite-gtags.vim +++ b/config/plugins/unite-gtags.vim @@ -1,8 +1,8 @@ -nnoremap <leader>gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('<cword>')<CR> -nnoremap <leader>gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context'<CR> +"nnoremap <leader>gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('<cword>')<CR> +"nnoremap <leader>gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context'<CR> nnoremap <leader>gr :execute 'Unite -auto-preview -start-insert -no-split gtags/ref'<CR> nnoremap <leader>gg :execute 'Unite -auto-preview -start-insert -no-split gtags/grep'<CR> -nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR> +"nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR> vnoremap <leader>gd <ESC>:execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.GetVisualSelection()<CR> let g:unite_source_gtags_project_config = { \ '_': { 'treelize': 0 } From c03652c404d84ddd7e2099325e8cf776afce508e Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sun, 29 Jan 2017 22:14:15 +0800 Subject: [PATCH 09/40] Fix readme mappings --- README.md | 11 +++++------ autoload/SpaceVim/layers/git.vim | 4 ++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5b0d4b652..fd83393f5 100644 --- a/README.md +++ b/README.md @@ -515,15 +515,14 @@ Key | Mode | Action `<leader>`+`gb` | Normal | Git blame `<leader>`+`gp` | Normal | Git push -##### Plugin: GitGutter +##### Plugin: vim-signify Key | Mode | Action ----- |:----:| ------------------ -`<leader>`+`hj` | Normal | Jump to next hunk -`<leader>`+`hk` | Normal | Jump to previous hunk -`<leader>`+`hs` | Normal | Stage hunk -`<leader>`+`hr` | Normal | Revert hunk -`<leader>`+`hp` | Normal | Preview hunk +`<leader>`+`hj` / `]c` | Normal | Jump to next hunk +`<leader>`+`hk` / `[c` | Normal | Jump to previous hunk +`<leader>`+`hJ` / `]C` | Normal | Jump to last hunk +`<leader>`+`hK` / `[C` | Normal | Jump to first hunk ##### Misc Plugins diff --git a/autoload/SpaceVim/layers/git.vim b/autoload/SpaceVim/layers/git.vim index 2f2244d1b..854f0cc0c 100644 --- a/autoload/SpaceVim/layers/git.vim +++ b/autoload/SpaceVim/layers/git.vim @@ -15,4 +15,8 @@ function! SpaceVim#layers#git#config() abort nnoremap <silent> <Leader>gc :Gita commit<CR> nnoremap <silent> <Leader>gb :Gita blame<CR> nnoremap <silent> <Leader>gp :Gita push<CR> + nmap <leader>hj <plug>(signify-next-hunk) + nmap <leader>hk <plug>(signify-prev-hunk) + nmap <leader>hJ 9999<leader>gj + nmap <leader>hK 9999<leader>gk endfunction From d59032e8d0e3eba05b9284e187bef4ed65d82000 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Sun, 29 Jan 2017 22:55:09 +0800 Subject: [PATCH 10/40] Use sub mode in doc --- autoload/SpaceVim.vim | 2 +- autoload/SpaceVim/layers/autocomplete.vim | 1 + autoload/SpaceVim/layers/colorscheme.vim | 1 + autoload/SpaceVim/layers/lang/c.vim | 1 + autoload/SpaceVim/layers/lang/java.vim | 1 + autoload/SpaceVim/layers/lang/php.vim | 1 + autoload/SpaceVim/layers/lang/rust.vim | 1 + doc/SpaceVim.txt | 88 +++++++++++------------ 8 files changed, 51 insertions(+), 45 deletions(-) diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 9f84333f8..8ba22b1b3 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -2,7 +2,7 @@ " @section Introduction, intro " @stylized Maktaba " @library -" @order intro version dicts functions exceptions layers autocomplete colorscheme layer_lang_java layer_lang_php layer_lang_c layer-lang-rust faq +" @order intro version dicts functions exceptions layers faq " SpaceVim is a Modular configuration, a bundle of custom settings " and plugins, for Vim. It got inspired by spacemacs. " diff --git a/autoload/SpaceVim/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index 33ada32e3..e792a791d 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -1,5 +1,6 @@ "" " @section Autocomplete, autocomplete +" @parentsection layers " SpaceVim use neocomplete as default completion engine for vim with lua " support, if has no lua support neocomplcache will be the completion engine. " SpaceVim use deoplete as default completion engine for nevoim. to make diff --git a/autoload/SpaceVim/layers/colorscheme.vim b/autoload/SpaceVim/layers/colorscheme.vim index 90453c2b1..86e15d787 100644 --- a/autoload/SpaceVim/layers/colorscheme.vim +++ b/autoload/SpaceVim/layers/colorscheme.vim @@ -1,5 +1,6 @@ "" " @section Colorscheme, colorscheme +" @parentsection layers " SpaceVim default colorscheme is gruvbox, you can change it by set spacevim " option. add this to your `~/.SpaceVim.d/init.vim` " > diff --git a/autoload/SpaceVim/layers/lang/c.vim b/autoload/SpaceVim/layers/lang/c.vim index 58a5679bc..3b70d4152 100644 --- a/autoload/SpaceVim/layers/lang/c.vim +++ b/autoload/SpaceVim/layers/lang/c.vim @@ -1,5 +1,6 @@ "" " @section Layer_lang_c +" @parentsection layers " this layer provide c family language code completion and syntax chaeck.you " need install clang. " diff --git a/autoload/SpaceVim/layers/lang/java.vim b/autoload/SpaceVim/layers/lang/java.vim index 6202f018f..9661008f9 100644 --- a/autoload/SpaceVim/layers/lang/java.vim +++ b/autoload/SpaceVim/layers/lang/java.vim @@ -1,5 +1,6 @@ "" " @section Layer_lang_java, layer_lang_java +" @parentsection layers " This layer is for java development. " > " import-mappings: diff --git a/autoload/SpaceVim/layers/lang/php.vim b/autoload/SpaceVim/layers/lang/php.vim index 708f8b300..c161f1f19 100644 --- a/autoload/SpaceVim/layers/lang/php.vim +++ b/autoload/SpaceVim/layers/lang/php.vim @@ -1,5 +1,6 @@ "" " @section Layer_lang_php +" @parentsection layers " this layer is for php development, and it provide auto codo completion, " and syntax check, and jump to the definition location. " diff --git a/autoload/SpaceVim/layers/lang/rust.vim b/autoload/SpaceVim/layers/lang/rust.vim index 94a53c92a..6627fb1da 100644 --- a/autoload/SpaceVim/layers/lang/rust.vim +++ b/autoload/SpaceVim/layers/lang/rust.vim @@ -1,5 +1,6 @@ "" " @section layer-lang-rust, layer-lang-rust +" @parentsection layers " SpaceVim do not load this layer by default, if you are a rust developer, you " should add `call SpaceVim#layers#load('lang#rust')` to your @section(config) " diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 08368ba90..ed325ea9e 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -7,13 +7,13 @@ CONTENTS *SpaceVim-contents* 2. CONFIGURATION...........................................|SpaceVim-config| 3. Functions............................................|SpaceVim-functions| 4. Layers..................................................|SpaceVim-layers| - 5. Autocomplete......................................|SpaceVim-autocomplete| - 6. Colorscheme........................................|SpaceVim-colorscheme| - 7. Layer_lang_java................................|SpaceVim-layer_lang_java| - 8. Layer_lang_php..................................|SpaceVim-layer_lang_php| - 9. Layer_lang_c......................................|SpaceVim-layer_lang_c| - 10. layer-lang-rust...............................|SpaceVim-layer-lang-rust| - 11. FAQ.......................................................|SpaceVim-faq| + 1. Autocomplete..................................|SpaceVim-autocomplete| + 2. Colorscheme....................................|SpaceVim-colorscheme| + 3. Layer_lang_c..................................|SpaceVim-layer_lang_c| + 4. Layer_lang_java............................|SpaceVim-layer_lang_java| + 5. Layer_lang_php..............................|SpaceVim-layer_lang_php| + 6. layer-lang-rust............................|SpaceVim-layer-lang-rust| + 5. FAQ........................................................|SpaceVim-faq| ============================================================================== INTRODUCTION *SpaceVim-intro* @@ -376,6 +376,43 @@ colorschemes: if the colorscheme you want do not list below, PR welcome. OceanicNext < +============================================================================== +LAYER_LANG_C *SpaceVim-layer_lang_c* + + this layer provide c family language code completion and syntax chaeck.you +need install clang. + +configuration: + + 1.setting compile flag: +> + let g:deoplete#sources#clang#flags = ['-Iwhatever', ...] +< + 2.`g:deoplete#sources#clang#executable` sets the path to the clang +executable. + + 3.`g:deoplete#sources#clang#autofill_neomake` is a boolean that tells this +plugin to fill in the `g:neomake_<filetype>_clang_maker` variable with the +clang executable path and flags. You will still need to enable it with +`g:neomake_<filetype>_enabled_make=['clang']`. + + 4.`g:deoplete#sources#clang#std` is a dict containing the standards you want +to use. It's not used if you already have `-std=whatever` in your flags. The +defaults are: +> + { + 'c': 'c11', + 'cpp': 'c++1z', + 'objc': 'c11', + 'objcpp': 'c++1z', + } +< + 5.`g:deoplete#sources#clang#preproc_max_lines` sets the maximum number of +lines to search for a #ifdef or #endif line. #ifdef lines are discarded to +get completions within conditional preprocessor blocks. The default is 50, +setting it to 0 disables this feature. + + ============================================================================== LAYER_LANG_JAVA *SpaceVim-layer_lang_java* @@ -427,43 +464,6 @@ requirement: Composer Project < -============================================================================== -LAYER_LANG_C *SpaceVim-layer_lang_c* - - this layer provide c family language code completion and syntax chaeck.you -need install clang. - -configuration: - - 1.setting compile flag: -> - let g:deoplete#sources#clang#flags = ['-Iwhatever', ...] -< - 2.`g:deoplete#sources#clang#executable` sets the path to the clang -executable. - - 3.`g:deoplete#sources#clang#autofill_neomake` is a boolean that tells this -plugin to fill in the `g:neomake_<filetype>_clang_maker` variable with the -clang executable path and flags. You will still need to enable it with -`g:neomake_<filetype>_enabled_make=['clang']`. - - 4.`g:deoplete#sources#clang#std` is a dict containing the standards you want -to use. It's not used if you already have `-std=whatever` in your flags. The -defaults are: -> - { - 'c': 'c11', - 'cpp': 'c++1z', - 'objc': 'c11', - 'objcpp': 'c++1z', - } -< - 5.`g:deoplete#sources#clang#preproc_max_lines` sets the maximum number of -lines to search for a #ifdef or #endif line. #ifdef lines are discarded to -get completions within conditional preprocessor blocks. The default is 50, -setting it to 0 disables this feature. - - ============================================================================== LAYER-LANG-RUST *SpaceVim-layer-lang-rust* From 520a372a8272818d0824861f3e97abf88faa7dea Mon Sep 17 00:00:00 2001 From: eliasrodrigo <eliasrodrigo@protonmail.com> Date: Sun, 29 Jan 2017 17:56:37 +0100 Subject: [PATCH 11/40] review 50% of the README --- README.md | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index fd83393f5..3666407a1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@  [SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim, -here we call them layers, each layer has different plugins and config, user just need +here we call them layers, each layer has different plugins and config, users just need to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim, please star it on github. It's a great way of getting feedback and gives me the kick to put more time into development. @@ -35,7 +35,7 @@ curl -sLf https://spacevim.org/install.sh | bash ``` before use SpaceVim, you should install the plugin by `call dein#install()` -installation of neovim/vim with python support: +Installation of neovim/vim with python support: > [neovim installation](https://github.com/neovim/neovim/wiki/Installing-Neovim) > [Building Vim from source](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source) @@ -49,16 +49,16 @@ curl -sLf https://spacevim.org/install.sh | bash -s -- -h ##### windows support - For vim in windows, please just clone this repo as vimfiles in you Home directory. - by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd. - make sure you have backup your own vimfiles. + by default, when open a cmd, the current dir is your Home directory, run this command in cmd. + make sure you have a backup of your own vimfiles. ```sh git clone https://github.com/SpaceVim/SpaceVim.git vimfiles ``` - For neovim in windows, please clone this repo as `AppData\Local\nvim` in your home directory. - for more info, please check out [neovim's wiki](https://github.com/neovim/neovim/wiki/Installing-Neovim). - by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd. + For more info, please check out [neovim's wiki](https://github.com/neovim/neovim/wiki/Installing-Neovim). + By defalut, when open a cmd, the current dir is your Home directory, run this command in cmd. ```sh git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim @@ -103,54 +103,54 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim - SpaceVim support `~/.SpaceVim.d/init.vim` and `./SpaceVim.d/init.vim`. -here is an example: +Here is an example: ```viml -" here are some basic customizations, please refer to the top of the vimrc -" file for all possible options +" Here are some basic customizations, please refer to the top of the vimrc +" file for all possible options: let g:spacevim_default_indent = 3 let g:spacevim_max_column = 80 let g:spacevim_colorscheme = 'my_awesome_colorscheme' let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug -" change the default directory where all miscellaneous persistent files go -" by default it is ~/.cache/vimfiles +" Change the default directory where all miscellaneous persistent files go. +" By default it is ~/.cache/vimfiles. let g:spacevim_plugin_bundle_dir = "/some/place/else" -" by default, language specific plugins are not loaded. this can be changed +" By default, language specific plugins are not loaded. This can be changed " with the following: let g:spacevim_plugin_groups_exclude = ['ruby', 'python'] -" if there are groups you want always loaded, you can use this: +" If there are groups you want always loaded, you can use this: let g:spacevim_plugin_groups_include = ['go'] -" alternatively, you can set this variable to load exactly what you want +" Alternatively, you can set this variable to load exactly what you want: let g:spacevim_plugin_groups = ['core', 'web'] -" if there is a particular plugin you don't like, you can define this -" variable to disable them entirely +" If there is a particular plugin you don't like, you can define this +" variable to disable them entirely: let g:spacevim_disabled_plugins=['vim-foo', 'vim-bar'] -" if you want to add some custom plugins, use this options. +" 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'], \ ] -" anything defined here are simply overrides +" Anything defined here are simply overrides set wildignore+=\*/node_modules/\* set guifont=Wingdings:h10 ``` -#### multiple leader mode -##### global origin vim leader, default : `\` -vim's origin global leader can be used in all the mode. -##### local origin vim leader, default : `,` -vim's origin local leader can be used in all the mode. -##### windows function leader, default : `s` -windows function leader can only be used in normal mode. -for the list of mappings see the [link](#window-management) -##### unite work flow leader, default : `f` -unite work flow leader can only be used in normal mode. unite leader need unite groups. +#### Multiple leader mode +##### Global origin vim leader, default : `\` +Vim's origin global leader can be used in all modes. +##### Local origin vim leader, default : `,` +Vim's origin local leader can be used in all the mode. +##### Windows function leader, default : `s` +Windows function leader can only be used in normal mode. +For the list of mappings see the [link](#window-management) +##### Unite work flow leader, default : `f` +Unite work flow leader can only be used in normal mode. Unite leader need unite groups. #### Unite centric work-flow - List all the plugins has been installed, fuzzy find what you want, @@ -282,7 +282,7 @@ Name | Description Name | Description -------------- | ---------------------- -[delimitmate] | Insert mode auto-completion for quotes, parens, brackets +[delimitmate] | Insert mode auto-completion for quotes, parenthesis, brackets [echodoc] | Print objects' documentation in echo area [deoplete] | Neovim: Dark powered asynchronous completion framework [neocomplete] | Next generation completion framework From f3ddbeb026055c67ddb6ee295169e62ed9a9169b Mon Sep 17 00:00:00 2001 From: Christian <me@rndm.de> Date: Mon, 30 Jan 2017 10:37:52 +0100 Subject: [PATCH 12/40] Fix `defalut` typo changes `defalut` to `default` --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4fecae323..533362aeb 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ curl -sLf https://spacevim.org/install.sh | bash -s -- -h ##### windows support - For vim in windows, please just clone this repo as vimfiles in you Home directory. - by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd. + by default, when open a cmd, the current dir is your Home directory, run this command in cmd. make sure you have backup your own vimfiles. ```sh @@ -87,7 +87,7 @@ git clone https://github.com/SpaceVim/SpaceVim.git vimfiles - For neovim in windows, please clone this repo as `AppData\Local\nvim` in your home directory. for more info, please check out [neovim's wiki](https://github.com/neovim/neovim/wiki/Installing-Neovim). - by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd. + by default, when open a cmd, the current dir is your Home directory, run this command in cmd. ```sh git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim @@ -116,7 +116,7 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ##### Neovim centric - Dark powered mode of SpaceVim. -By defalut, SpaceVim use these dark powered plugins: +By default, SpaceVim use these dark powered plugins: 1. [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) - Dark powered asynchronous completion framework for neovim 2. [dein.vim](https://github.com/Shougo/dein.vim) - Dark powered Vim/Neovim plugin manager @@ -567,7 +567,7 @@ Key | Mode | Action `<leader>`+`K` | Normal | Thesaurus #### Custom configuration -SpaceVim use `~/.SpaceVim.d/init.vim` as defalut global init file. you can set +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. From 500a7e7d6c8677a93335deec19dff7ed41068d27 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Mon, 30 Jan 2017 20:36:03 +0800 Subject: [PATCH 13/40] Fix #177 --- autoload/SpaceVim.vim | 7 +++++++ doc/SpaceVim.txt | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 8ba22b1b3..0ae562abe 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -117,6 +117,13 @@ let g:spacevim_use_colorscheme = 1 " < let g:spacevim_vim_help_language = 'en' "" +" Set the message language of vim. By default it is empty, and the language is +" en_US.UTF-8. example: +" > +" let g:spacevim_language = 'en_CA.utf8' +" < +let g:spacevim_language = '' +"" " The colorscheme of SpaceVim, if colorscheme groups are installed. let g:spacevim_colorscheme = 'gruvbox' "" diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index ed325ea9e..a4ef7767e 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -119,6 +119,13 @@ chinese. let g:spacevim_vim_help_language = 'chinese' < + *g:spacevim_language* +Set the message language of vim. By default it is empty, and the language is +en_US.UTF-8. example: +> + let g:spacevim_language = 'en_CA.utf8' +< + *g:spacevim_colorscheme* The colorscheme of SpaceVim, if colorscheme groups are installed. From ef2969c122b595e4be06aa33a4c4466811bdbd19 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 00:00:32 +0800 Subject: [PATCH 14/40] Add lang/viml layer --- autoload/SpaceVim/default.vim | 1 + autoload/SpaceVim/layers/lang/vim.vim | 10 ++++++++++ autoload/SpaceVim/mapping.vim | 8 ++++++++ autoload/SpaceVim/mapping/gd.vim | 8 ++++++++ 4 files changed, 27 insertions(+) create mode 100644 autoload/SpaceVim/layers/lang/vim.vim create mode 100644 autoload/SpaceVim/mapping/gd.vim diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 471907ffe..1bf582fca 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -362,6 +362,7 @@ function! SpaceVim#default#SetMappings() abort call SpaceVim#mapping#def('nnoremap <silent>', '<Leader>sg', ':vsplit<CR>:wincmd p<CR>:e#<CR>', \'Open previous buffer in vsplit window' , 'vsplit|wincmd p|e#') call SpaceVim#mapping#def('nnoremap <silent>', 'gf', ':call zvim#gf()<CR>', 'Jump to a file under cursor', '') + call SpaceVim#mapping#def('nnoremap <silent>', 'gd', ':call SpaceVim#mapping#gd()<CR>', 'Goto declaration', '') endfunction fu! s:tobur(num) abort diff --git a/autoload/SpaceVim/layers/lang/vim.vim b/autoload/SpaceVim/layers/lang/vim.vim new file mode 100644 index 000000000..ca038e7c7 --- /dev/null +++ b/autoload/SpaceVim/layers/lang/vim.vim @@ -0,0 +1,10 @@ +function! SpaceVim#layers#lang#vim#plugins() abort + let plugins = [] + call add(plugins,['tweekmonster/exception.vim']) + call add(plugins,['mhinz/vim-lookup']) + return plugins +endfunction + +function! SpaceVim#layers#lang#vim#config() abort + call SpaceVim#mapping#gd#add('vim','lookup#lookup') +endfunction diff --git a/autoload/SpaceVim/mapping.vim b/autoload/SpaceVim/mapping.vim index 810bacd8f..df4c71478 100644 --- a/autoload/SpaceVim/mapping.vim +++ b/autoload/SpaceVim/mapping.vim @@ -56,3 +56,11 @@ function! SpaceVim#mapping#enter() abort return "\<Enter>" endif endfunction + +function! SpaceVim#mapping#gd() abort + if !empty(SpaceVim#mapping#gd#get()) + call call(SpaceVim#mapping#gd#get(), []) + else + normal! gd + endif +endfunction diff --git a/autoload/SpaceVim/mapping/gd.vim b/autoload/SpaceVim/mapping/gd.vim new file mode 100644 index 000000000..72c39f0ec --- /dev/null +++ b/autoload/SpaceVim/mapping/gd.vim @@ -0,0 +1,8 @@ +let s:gd = {} +function! SpaceVim#mapping#gd#add(ft, func) abort + call extend(s:gd,{a:ft : a:func}) +endfunction + +function! SpaceVim#mapping#gd#get() abort + return get(s:gd, &filetype, '') +endfunction From 685ed4af58352e00f0b7d5744dd630e2259126b5 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 19:05:59 +0800 Subject: [PATCH 15/40] Add lang#xml layer --- autoload/SpaceVim/default.vim | 3 +++ autoload/SpaceVim/layers/lang/c.vim | 2 +- autoload/SpaceVim/layers/lang/java.vim | 2 +- autoload/SpaceVim/layers/lang/php.vim | 2 +- autoload/SpaceVim/layers/lang/xml.vim | 13 +++++++++++++ doc/SpaceVim.txt | 20 +++++++++++++------- 6 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 autoload/SpaceVim/layers/lang/xml.vim diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 471907ffe..ea6551255 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -44,6 +44,9 @@ function! SpaceVim#default#SetOptions() abort set softtabstop=4 set shiftwidth=4 + " autoread + set autoread + " backup set backup set undofile diff --git a/autoload/SpaceVim/layers/lang/c.vim b/autoload/SpaceVim/layers/lang/c.vim index 3b70d4152..44161d7d6 100644 --- a/autoload/SpaceVim/layers/lang/c.vim +++ b/autoload/SpaceVim/layers/lang/c.vim @@ -1,5 +1,5 @@ "" -" @section Layer_lang_c +" @section lang#c, layer-lang-c " @parentsection layers " this layer provide c family language code completion and syntax chaeck.you " need install clang. diff --git a/autoload/SpaceVim/layers/lang/java.vim b/autoload/SpaceVim/layers/lang/java.vim index 9661008f9..5a732c1f4 100644 --- a/autoload/SpaceVim/layers/lang/java.vim +++ b/autoload/SpaceVim/layers/lang/java.vim @@ -1,5 +1,5 @@ "" -" @section Layer_lang_java, layer_lang_java +" @section lang#java, layer-lang-java " @parentsection layers " This layer is for java development. " > diff --git a/autoload/SpaceVim/layers/lang/php.vim b/autoload/SpaceVim/layers/lang/php.vim index c161f1f19..d3d9d4b1f 100644 --- a/autoload/SpaceVim/layers/lang/php.vim +++ b/autoload/SpaceVim/layers/lang/php.vim @@ -1,5 +1,5 @@ "" -" @section Layer_lang_php +" @section lang#php, layer-lang-php " @parentsection layers " this layer is for php development, and it provide auto codo completion, " and syntax check, and jump to the definition location. diff --git a/autoload/SpaceVim/layers/lang/xml.vim b/autoload/SpaceVim/layers/lang/xml.vim new file mode 100644 index 000000000..f4cc47bd3 --- /dev/null +++ b/autoload/SpaceVim/layers/lang/xml.vim @@ -0,0 +1,13 @@ +"" +" @section lang#xml, layer-lang-xml +" @parentsection layers +" when edite an xml file, the omni func is + + +function! SpaceVim#layers#lang#xml#plugins() abort + return [] +endfunction + +function! SpaceVim#layers#lang#xml#config() abort + +endfunction diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index a4ef7767e..d52c6927a 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -9,10 +9,11 @@ CONTENTS *SpaceVim-contents* 4. Layers..................................................|SpaceVim-layers| 1. Autocomplete..................................|SpaceVim-autocomplete| 2. Colorscheme....................................|SpaceVim-colorscheme| - 3. Layer_lang_c..................................|SpaceVim-layer_lang_c| - 4. Layer_lang_java............................|SpaceVim-layer_lang_java| - 5. Layer_lang_php..............................|SpaceVim-layer_lang_php| - 6. layer-lang-rust............................|SpaceVim-layer-lang-rust| + 3. lang#c........................................|SpaceVim-layer-lang-c| + 4. lang#java..................................|SpaceVim-layer-lang-java| + 5. lang#php....................................|SpaceVim-layer-lang-php| + 6. lang#xml....................................|SpaceVim-layer-lang-xml| + 7. layer-lang-rust............................|SpaceVim-layer-lang-rust| 5. FAQ........................................................|SpaceVim-faq| ============================================================================== @@ -384,7 +385,7 @@ colorschemes: if the colorscheme you want do not list below, PR welcome. < ============================================================================== -LAYER_LANG_C *SpaceVim-layer_lang_c* +LANG#C *SpaceVim-layer-lang-c* this layer provide c family language code completion and syntax chaeck.you need install clang. @@ -421,7 +422,7 @@ setting it to 0 disables this feature. ============================================================================== -LAYER_LANG_JAVA *SpaceVim-layer_lang_java* +LANG#JAVA *SpaceVim-layer-lang-java* This layer is for java development. > @@ -458,7 +459,7 @@ This layer is for java development. ============================================================================== -LAYER_LANG_PHP *SpaceVim-layer_lang_php* +LANG#PHP *SpaceVim-layer-lang-php* this layer is for php development, and it provide auto codo completion, and syntax check, and jump to the definition location. @@ -471,6 +472,11 @@ requirement: Composer Project < +============================================================================== +LANG#XML *SpaceVim-layer-lang-xml* + +when edite an xml file, the omni func is + ============================================================================== LAYER-LANG-RUST *SpaceVim-layer-lang-rust* From e14223c1e7d062acf875e082dbfde67fd25a86fa Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 20:09:13 +0800 Subject: [PATCH 16/40] Update doc for snippoet --- autoload/SpaceVim/layers/autocomplete.vim | 8 ++++++- autoload/SpaceVim/layers/colorscheme.vim | 2 +- autoload/SpaceVim/layers/lang.vim | 1 - autoload/SpaceVim/layers/lang/rust.vim | 2 +- autoload/SpaceVim/layers/lang/xml.vim | 6 +++-- doc/SpaceVim.txt | 27 ++++++++++++++--------- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/autoload/SpaceVim/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index e792a791d..6047cebb4 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -1,6 +1,7 @@ "" -" @section Autocomplete, autocomplete +" @section autocomplete, autocomplete " @parentsection layers +" @subsection code completion " SpaceVim use neocomplete as default completion engine for vim with lua " support, if has no lua support neocomplcache will be the completion engine. " SpaceVim use deoplete as default completion engine for nevoim. to make @@ -8,6 +9,11 @@ " " SpaceVim include YouCompleteMe, but it is disabled by default, to enable " ycm, see |g:spacevim_enable_ycm|. +" +" @subsection snippet +" SpaceVim use neosnippet as default snippet engine, and the default snippets +" is `Shougo/neosnippet-snippets`. for more information, please read +" |neosnippet|. diff --git a/autoload/SpaceVim/layers/colorscheme.vim b/autoload/SpaceVim/layers/colorscheme.vim index 86e15d787..2562a96d8 100644 --- a/autoload/SpaceVim/layers/colorscheme.vim +++ b/autoload/SpaceVim/layers/colorscheme.vim @@ -1,5 +1,5 @@ "" -" @section Colorscheme, colorscheme +" @section colorscheme, colorscheme " @parentsection layers " SpaceVim default colorscheme is gruvbox, you can change it by set spacevim " option. add this to your `~/.SpaceVim.d/init.vim` diff --git a/autoload/SpaceVim/layers/lang.vim b/autoload/SpaceVim/layers/lang.vim index 8aee52f64..e29e8a49f 100644 --- a/autoload/SpaceVim/layers/lang.vim +++ b/autoload/SpaceVim/layers/lang.vim @@ -10,7 +10,6 @@ function! SpaceVim#layers#lang#plugins() abort \ ['wavded/vim-stylus', { 'on_ft' : ['styl']}], \ ['digitaltoad/vim-jade', { 'on_ft' : ['jade']}], \ ['juvenn/mustache.vim', { 'on_ft' : ['mustache']}], - \ ['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}], \ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}], \ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}], \ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}], diff --git a/autoload/SpaceVim/layers/lang/rust.vim b/autoload/SpaceVim/layers/lang/rust.vim index 6627fb1da..43fa3e62f 100644 --- a/autoload/SpaceVim/layers/lang/rust.vim +++ b/autoload/SpaceVim/layers/lang/rust.vim @@ -1,5 +1,5 @@ "" -" @section layer-lang-rust, layer-lang-rust +" @section lang#rust, layer-lang-rust " @parentsection layers " SpaceVim do not load this layer by default, if you are a rust developer, you " should add `call SpaceVim#layers#load('lang#rust')` to your @section(config) diff --git a/autoload/SpaceVim/layers/lang/xml.vim b/autoload/SpaceVim/layers/lang/xml.vim index f4cc47bd3..46ebf004e 100644 --- a/autoload/SpaceVim/layers/lang/xml.vim +++ b/autoload/SpaceVim/layers/lang/xml.vim @@ -1,11 +1,13 @@ "" " @section lang#xml, layer-lang-xml " @parentsection layers -" when edite an xml file, the omni func is +" when edite an xml file, the omni func is `xmlcomplete#CompleteTags`, you can +" read the document in `autoload/xmlcomplete.vim` in vim or neovim +" runtime directory. function! SpaceVim#layers#lang#xml#plugins() abort - return [] + return [['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]] endfunction function! SpaceVim#layers#lang#xml#config() abort diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index d52c6927a..52262e104 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -7,13 +7,13 @@ CONTENTS *SpaceVim-contents* 2. CONFIGURATION...........................................|SpaceVim-config| 3. Functions............................................|SpaceVim-functions| 4. Layers..................................................|SpaceVim-layers| - 1. Autocomplete..................................|SpaceVim-autocomplete| - 2. Colorscheme....................................|SpaceVim-colorscheme| + 1. autocomplete..................................|SpaceVim-autocomplete| + 2. colorscheme....................................|SpaceVim-colorscheme| 3. lang#c........................................|SpaceVim-layer-lang-c| 4. lang#java..................................|SpaceVim-layer-lang-java| 5. lang#php....................................|SpaceVim-layer-lang-php| - 6. lang#xml....................................|SpaceVim-layer-lang-xml| - 7. layer-lang-rust............................|SpaceVim-layer-lang-rust| + 6. lang#rust..................................|SpaceVim-layer-lang-rust| + 7. lang#xml....................................|SpaceVim-layer-lang-xml| 5. FAQ........................................................|SpaceVim-faq| ============================================================================== @@ -245,6 +245,7 @@ LAYERS *SpaceVim-layers* ============================================================================== AUTOCOMPLETE *SpaceVim-autocomplete* +CODE COMPLETION SpaceVim use neocomplete as default completion engine for vim with lua support, if has no lua support neocomplcache will be the completion engine. SpaceVim use deoplete as default completion engine for nevoim. to make neovim @@ -253,6 +254,10 @@ support python, please read neovim's |provider-python|. SpaceVim include YouCompleteMe, but it is disabled by default, to enable ycm, see |g:spacevim_enable_ycm|. +SNIPPET +SpaceVim use neosnippet as default snippet engine, and the default snippets is +`Shougo/neosnippet-snippets`. for more information, please read |neosnippet|. + ============================================================================== COLORSCHEME *SpaceVim-colorscheme* @@ -473,12 +478,7 @@ requirement: < ============================================================================== -LANG#XML *SpaceVim-layer-lang-xml* - -when edite an xml file, the omni func is - -============================================================================== -LAYER-LANG-RUST *SpaceVim-layer-lang-rust* +LANG#RUST *SpaceVim-layer-lang-rust* SpaceVim do not load this layer by default, if you are a rust developer, you should add `call SpaceVim#layers#load('lang#rust')` to your |SpaceVim-config| @@ -504,6 +504,13 @@ mappings: normal <leader>gd rust-doc < +============================================================================== +LANG#XML *SpaceVim-layer-lang-xml* + +when edite an xml file, the omni func is `xmlcomplete#CompleteTags`, you can +read the document in `autoload/xmlcomplete.vim` in vim or neovim runtime +directory. + ============================================================================== FAQ *SpaceVim-faq* From 3fb5713f44a9caf48ee56e450c240dbc40749486 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 20:31:50 +0800 Subject: [PATCH 17/40] Move neco-vim --- autoload/SpaceVim/layers/autocomplete.vim | 1 - autoload/SpaceVim/layers/git.vim | 4 ++++ autoload/SpaceVim/layers/lang/vim.vim | 2 ++ autoload/SpaceVim/layers/tools.vim | 1 - 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index 6047cebb4..b7a470973 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -22,7 +22,6 @@ function! SpaceVim#layers#autocomplete#plugins() abort \ ['honza/vim-snippets', {'on_i' : 1, 'loadconf_before' : 1}], \ ['Shougo/neco-syntax', { 'on_i' : 1}], \ ['ujihisa/neco-look', { 'on_i' : 1}], - \ ['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}], \ ['Shougo/context_filetype.vim', { 'on_i' : 1}], \ ['Shougo/neoinclude.vim', { 'on_i' : 1}], \ ['Shougo/neosnippet-snippets', { 'merged' : 0}], diff --git a/autoload/SpaceVim/layers/git.vim b/autoload/SpaceVim/layers/git.vim index 854f0cc0c..d16df70fa 100644 --- a/autoload/SpaceVim/layers/git.vim +++ b/autoload/SpaceVim/layers/git.vim @@ -19,4 +19,8 @@ function! SpaceVim#layers#git#config() abort nmap <leader>hk <plug>(signify-prev-hunk) nmap <leader>hJ 9999<leader>gj nmap <leader>hK 9999<leader>gk + augroup spacevim_layer_git + autocmd! + autocmd FileType diff nnoremap <buffer><silent> q :bd!<CR> + augroup END endfunction diff --git a/autoload/SpaceVim/layers/lang/vim.vim b/autoload/SpaceVim/layers/lang/vim.vim index ca038e7c7..1aa54ca52 100644 --- a/autoload/SpaceVim/layers/lang/vim.vim +++ b/autoload/SpaceVim/layers/lang/vim.vim @@ -2,6 +2,8 @@ function! SpaceVim#layers#lang#vim#plugins() abort let plugins = [] call add(plugins,['tweekmonster/exception.vim']) call add(plugins,['mhinz/vim-lookup']) + call add(plugins,['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}]) + call add(plugins,['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}]) return plugins endfunction diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim index 37d0af92d..0612a5bb4 100644 --- a/autoload/SpaceVim/layers/tools.vim +++ b/autoload/SpaceVim/layers/tools.vim @@ -6,7 +6,6 @@ function! SpaceVim#layers#tools#plugins() abort \ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}], \ ['Yggdroot/LeaderF', {'merged' : 0}], \ ['google/vim-searchindex'], - \ ['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}], \ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}], \ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}], \ ['mhinz/vim-grepper' , { 'on_cmd' : 'Grepper', 'loadconf' : 1} ], From 761a603ac6e0c5fcf9d2eb1934ee45690d92f62f Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 20:48:26 +0800 Subject: [PATCH 18/40] Fix #183 --- autoload/SpaceVim/options.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/options.vim b/autoload/SpaceVim/options.vim index 3a6a2cf2e..a4ee626dd 100644 --- a/autoload/SpaceVim/options.vim +++ b/autoload/SpaceVim/options.vim @@ -1,11 +1,13 @@ function! SpaceVim#options#list() abort let list = [] - if has('patch-7.4.2010') + if has('patch-7.4.2010') && 0 for var in getcompletion('g:spacevim_','var') call add(list, var . ' = ' . string(get(g:, var[2:] , ''))) endfor else - call add(list, 'your vim is too old, getcompletion() need patch7-4-2010') + for var in filter(map(split(execute('let g:'), "\n"), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'") + call add(list,'g:' . var . ' = ' . string(get(g:, var , ''))) + endfor endif return list endfunction From 704a895f02c3530d1cacf728ad9cb344dcc6f280 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 20:55:03 +0800 Subject: [PATCH 19/40] Remove flag --- autoload/SpaceVim/options.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/SpaceVim/options.vim b/autoload/SpaceVim/options.vim index a4ee626dd..32afac980 100644 --- a/autoload/SpaceVim/options.vim +++ b/autoload/SpaceVim/options.vim @@ -1,6 +1,6 @@ function! SpaceVim#options#list() abort let list = [] - if has('patch-7.4.2010') && 0 + if has('patch-7.4.2010') for var in getcompletion('g:spacevim_','var') call add(list, var . ' = ' . string(get(g:, var[2:] , ''))) endfor From 342aee140cdb0c9d9754ce5132d939a3131a7cef Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 21:11:31 +0800 Subject: [PATCH 20/40] Add s:execute function thanks to tweekmonster --- autoload/SpaceVim/options.vim | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/options.vim b/autoload/SpaceVim/options.vim index 32afac980..2c04827cc 100644 --- a/autoload/SpaceVim/options.vim +++ b/autoload/SpaceVim/options.vim @@ -1,13 +1,25 @@ function! SpaceVim#options#list() abort let list = [] - if has('patch-7.4.2010') + if has('patch-7.4.2010') && 0 for var in getcompletion('g:spacevim_','var') call add(list, var . ' = ' . string(get(g:, var[2:] , ''))) endfor else - for var in filter(map(split(execute('let g:'), "\n"), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'") + redraw + for var in filter(map(s:execute('let g:'), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'") call add(list,'g:' . var . ' = ' . string(get(g:, var , ''))) endfor endif return list endfunction + +function! s:execute(cmd) abort + if exists('*execute') + return split(execute(a:cmd), "\n") + endif + + redir => output + execute a:cmd + redir END + return split(output, "\n") +endfunction From 18712bfa0e9c38a91678fbf6c52251deb1d07c72 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Tue, 31 Jan 2017 22:15:06 +0800 Subject: [PATCH 21/40] Add go layer doc --- autoload/SpaceVim/layers/lang/go.vim | 39 +++++++++++++++++++++------- doc/SpaceVim.txt | 28 +++++++++++++++++--- 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/autoload/SpaceVim/layers/lang/go.vim b/autoload/SpaceVim/layers/lang/go.vim index 84f4515b2..05f2c00a1 100644 --- a/autoload/SpaceVim/layers/lang/go.vim +++ b/autoload/SpaceVim/layers/lang/go.vim @@ -1,3 +1,22 @@ +"" +" @section lang#go, layer-lang-go +" @parentsection layers +" This layer support go development, include code completion and syntax check. +" @subsection mappings +" > +" mode key function +" normal <leader>gi go implements +" normal <leader>gf go info +" normal <leader>ge go rename +" normal <leader>gr go run +" normal <leader>gb go build +" normal <leader>gt go test +" normal <leader>gd go doc +" normal <leader>gv go doc vertical +" normal <leader>gco go coverage +" < + + function! SpaceVim#layers#lang#go#plugins() abort let plugins = [['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}]] if has('nvim') @@ -16,18 +35,18 @@ function! SpaceVim#layers#lang#go#config() abort let g:go_fmt_command = 'goimports' let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck'] let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] } - let g:go_snippet_engine = "neosnippet" + let g:go_snippet_engine = 'neosnippet' augroup SpaceVim_go au! - au FileType go nmap <Buffer><Leader>s <Plug>(go-implements) - au FileType go nmap <Buffer><Leader>i <Plug>(go-info) - au FileType go nmap <Buffer><Leader>e <Plug>(go-rename) - au FileType go nmap <Buffer><Leader>r <Plug>(go-run) - au FileType go nmap <Buffer><Leader>b <Plug>(go-build) - au FileType go nmap <Buffer><Leader>t <Plug>(go-test) - au FileType go nmap <Buffer><Leader>gd <Plug>(go-doc) - au FileType go nmap <Buffer><Leader>gv <Plug>(go-doc-vertical) - au FileType go nmap <Buffer><Leader>co <Plug>(go-coverage) + au FileType go nmap <Buffer><silent><Leader>s <Plug>(go-implements) + au FileType go nmap <Buffer><silent><Leader>i <Plug>(go-info) + au FileType go nmap <Buffer><silent><Leader>e <Plug>(go-rename) + au FileType go nmap <Buffer><silent><Leader>r <Plug>(go-run) + au FileType go nmap <Buffer><silent><Leader>b <Plug>(go-build) + au FileType go nmap <Buffer><silent><Leader>t <Plug>(go-test) + au FileType go nmap <Buffer><silent><Leader>gd <Plug>(go-doc) + au FileType go nmap <Buffer><silent><Leader>gv <Plug>(go-doc-vertical) + au FileType go nmap <Buffer><silent><Leader>co <Plug>(go-coverage) augroup END endfunction diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 52262e104..02b49c298 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -10,10 +10,11 @@ CONTENTS *SpaceVim-contents* 1. autocomplete..................................|SpaceVim-autocomplete| 2. colorscheme....................................|SpaceVim-colorscheme| 3. lang#c........................................|SpaceVim-layer-lang-c| - 4. lang#java..................................|SpaceVim-layer-lang-java| - 5. lang#php....................................|SpaceVim-layer-lang-php| - 6. lang#rust..................................|SpaceVim-layer-lang-rust| - 7. lang#xml....................................|SpaceVim-layer-lang-xml| + 4. lang#go......................................|SpaceVim-layer-lang-go| + 5. lang#java..................................|SpaceVim-layer-lang-java| + 6. lang#php....................................|SpaceVim-layer-lang-php| + 7. lang#rust..................................|SpaceVim-layer-lang-rust| + 8. lang#xml....................................|SpaceVim-layer-lang-xml| 5. FAQ........................................................|SpaceVim-faq| ============================================================================== @@ -426,6 +427,25 @@ get completions within conditional preprocessor blocks. The default is 50, setting it to 0 disables this feature. +============================================================================== +LANG#GO *SpaceVim-layer-lang-go* + +This layer support go development, include code completion and syntax check. +MAPPINGS + +> + mode key function + normal <leader>gi go implements + normal <leader>gf go info + normal <leader>ge go rename + normal <leader>gr go run + normal <leader>gb go build + normal <leader>gt go test + normal <leader>gd go doc + normal <leader>gv go doc vertical + normal <leader>gco go coverage +< + ============================================================================== LANG#JAVA *SpaceVim-layer-lang-java* From 2c761323ebaafbcf9ca949ec8e5ad16e355a4f3e Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 16:00:22 +0800 Subject: [PATCH 22/40] Add lang#python layer --- autoload/SpaceVim/layers/lang.vim | 6 ------ autoload/SpaceVim/layers/lang/python.vim | 10 ++++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 autoload/SpaceVim/layers/lang/python.vim diff --git a/autoload/SpaceVim/layers/lang.vim b/autoload/SpaceVim/layers/lang.vim index e29e8a49f..ec2e50632 100644 --- a/autoload/SpaceVim/layers/lang.vim +++ b/autoload/SpaceVim/layers/lang.vim @@ -24,12 +24,6 @@ function! SpaceVim#layers#lang#plugins() abort \ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}], \ ['voxpupuli/vim-puppet', {'on_ft' : 'puppet'}], \ ] - " python - if has('nvim') - call add(plugins, ['zchee/deoplete-jedi', { 'on_ft' : 'python'}]) - else - call add(plugins, ['davidhalter/jedi-vim', { 'on_ft' : 'python'}]) - endif return plugins endfunction diff --git a/autoload/SpaceVim/layers/lang/python.vim b/autoload/SpaceVim/layers/lang/python.vim new file mode 100644 index 000000000..fdc066618 --- /dev/null +++ b/autoload/SpaceVim/layers/lang/python.vim @@ -0,0 +1,10 @@ +function! SpaceVim#layers#lang#python#plugins() abort + let plugins = [] + " python + if has('nvim') + call add(plugins, ['zchee/deoplete-jedi', { 'on_ft' : 'python'}]) + else + call add(plugins, ['davidhalter/jedi-vim', { 'on_ft' : 'python'}]) + endif + return plugins +endfunction From 48550352dc8691870c1641d08a207f23fb1968be Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 16:50:31 +0800 Subject: [PATCH 23/40] Add close tags and xmledite --- autoload/SpaceVim/layers/lang/xml.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/layers/lang/xml.vim b/autoload/SpaceVim/layers/lang/xml.vim index 46ebf004e..80380f1b0 100644 --- a/autoload/SpaceVim/layers/lang/xml.vim +++ b/autoload/SpaceVim/layers/lang/xml.vim @@ -7,7 +7,11 @@ function! SpaceVim#layers#lang#xml#plugins() abort - return [['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]] + let plugins = [] + call add(plugins,['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) + call add(plugins,['sukima/xmledit', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) + call add(plugins,['alvan/vim-closetag', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) + return plugins endfunction function! SpaceVim#layers#lang#xml#config() abort From 47c32d073be83b973392ea004a1e674b18c0c9d9 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 19:22:39 +0800 Subject: [PATCH 24/40] Remove usless plugin --- autoload/SpaceVim/layers/lang/xml.vim | 1 - 1 file changed, 1 deletion(-) diff --git a/autoload/SpaceVim/layers/lang/xml.vim b/autoload/SpaceVim/layers/lang/xml.vim index 80380f1b0..adb00e0ca 100644 --- a/autoload/SpaceVim/layers/lang/xml.vim +++ b/autoload/SpaceVim/layers/lang/xml.vim @@ -10,7 +10,6 @@ function! SpaceVim#layers#lang#xml#plugins() abort let plugins = [] call add(plugins,['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) call add(plugins,['sukima/xmledit', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) - call add(plugins,['alvan/vim-closetag', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) return plugins endfunction From 7908d6b726077a39047a5b37f598dfed7df26310 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 19:49:57 +0800 Subject: [PATCH 25/40] Update language readme --- README.md | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index c3ac8622b..304481303 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,21 @@ - [Windows support](#windows-support) - [File Structure](#file-structure) - Features - - [Neovim centric - Dark powered mode](#neovim-centric---dark-powered-mode-of-spacevim) - - [Modular configuration](#modular-configuration) - - [multiple leader mode](#multiple-leader-mode) - - Lazy-load 90% of plugins with [dein.vim] - - Robust, yet light weight - - [Unite centric work-flow](#unite-centric-work-flow) - [Awesome ui](#awesome-ui) - [Language specific mode](#language-specific-mode) + - c/c++ support + - go support + - rust support + - php support + - python support + - perl support + - lua support + - [Unite centric work-flow](#unite-centric-work-flow) + - [Neovim centric - Dark powered mode](#neovim-centric---dark-powered-mode-of-spacevim) + - [multiple leader mode](#multiple-leader-mode) + - [Modular configuration](#modular-configuration) + - Lazy-load 90% of plugins with [dein.vim] + - Robust, yet light weight - Extensive Neocomplete setup - Central location for tags - Lightweight simple status/tabline @@ -114,6 +121,18 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim #### Features +##### Awesome ui + +- outline + filemanager + checker +  + +##### Language specific mode + +###### c/c++ support + +1. code completion: +2. syntax check: + ##### Neovim centric - Dark powered mode of SpaceVim. By default, SpaceVim use these dark powered plugins: @@ -196,18 +215,6 @@ Unite work flow leader can only be used in normal mode. Unite leader need unite - List all the starred repos in github.com, fuzzy find and open the website of the repo. default key is `<leader>ls`  -#### Awesome ui -- outline + filemanager + checker -  - -#### Language specific mode -- java -- viml -- rust -- php -- c/c++ -- js -- python #### Plugin Highlights From 4b8a3dda33c8e16a57c25d327b1132a045725f72 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 20:00:00 +0800 Subject: [PATCH 26/40] Add c/c++ pic --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 304481303..09351a4ed 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,8 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ###### c/c++ support -1. code completion: +1. code completion: autocompletion and fuzzy match. +  2. syntax check: ##### Neovim centric - Dark powered mode of SpaceVim. From 2ddc18c1a249ddc1078a95fcf9a174a6dbed3cc6 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 20:18:23 +0800 Subject: [PATCH 27/40] Add c/c++ lint pic --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 09351a4ed..23b08a979 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,8 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim 1. code completion: autocompletion and fuzzy match.  -2. syntax check: +2. syntax check: Asynchronous linting and make framework. +  ##### Neovim centric - Dark powered mode of SpaceVim. From e28912eeedcde4b8c9ba4d707e6c00c9ccc6ee30 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 20:37:36 +0800 Subject: [PATCH 28/40] Update pics --- README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 23b08a979..2a759c90c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ [](https://github.com/SpaceVim/SpaceVim) [](https://twitter.com/SpaceVim) - + ### Table of Contents - [Introduction](#introduction) @@ -24,7 +24,7 @@ - Features - [Awesome ui](#awesome-ui) - [Language specific mode](#language-specific-mode) - - c/c++ support + - [c/c++ support](#cc-support) - go support - rust support - php support @@ -124,7 +124,7 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ##### Awesome ui - outline + filemanager + checker -  +  ##### Language specific mode @@ -204,20 +204,14 @@ For the list of mappings see the [link](#window-management) Unite work flow leader can only be used in normal mode. Unite leader need unite groups. #### Unite centric work-flow -- List all the plugins has been installed, fuzzy find what you want, - default action is open the github website of current plugin. default key is `<leader>lp` - - [layer name] [plugin name] [load type] [plugin options] - +- List all the plugins has been installed, fuzzy find what you want, default action is open the github website of current plugin. default key is `<leader>lp`  - List all the mappings and description: `f<space>` -  +  - List all the starred repos in github.com, fuzzy find and open the website of the repo. default key is `<leader>ls` -  - - +  #### Plugin Highlights From 8c165e287d037af3bde9bc79afa7cd2aa49f7158 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 20:50:52 +0800 Subject: [PATCH 29/40] Update mapping menu picture --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a759c90c..a602f9f7e 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ Unite work flow leader can only be used in normal mode. Unite leader need unite  - List all the mappings and description: `f<space>` -  +  - List all the starred repos in github.com, fuzzy find and open the website of the repo. default key is `<leader>ls`  From bb6bbf7a087b469a8109cef0c284338a25b05ef9 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 21:01:15 +0800 Subject: [PATCH 30/40] Add back button --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a602f9f7e..36f9fa569 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ##### Language specific mode -###### c/c++ support +###### c/c++ support [back](#table-of-contents) 1. code completion: autocompletion and fuzzy match.  From 737858bde35db3a32d7a569e86822193474c59d2 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 22:14:39 +0800 Subject: [PATCH 31/40] Add go pic --- README.md | 11 +++++++++-- config/plugins/deoplete.vim | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36f9fa569..a6d942b01 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ - [Awesome ui](#awesome-ui) - [Language specific mode](#language-specific-mode) - [c/c++ support](#cc-support) - - go support + - [go support](#go-support) - rust support - php support - python support @@ -128,13 +128,20 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ##### Language specific mode -###### c/c++ support [back](#table-of-contents) +###### c/c++ support 1. code completion: autocompletion and fuzzy match.  2. syntax check: Asynchronous linting and make framework.  +###### go support +1. code completion: +  + +2. syntax check: +  + ##### Neovim centric - Dark powered mode of SpaceVim. By default, SpaceVim use these dark powered plugins: diff --git a/config/plugins/deoplete.vim b/config/plugins/deoplete.vim index 81f69bf24..f7c20ad4d 100644 --- a/config/plugins/deoplete.vim +++ b/config/plugins/deoplete.vim @@ -28,6 +28,7 @@ let g:deoplete#ignore_sources.c = ['omni'] let g:deoplete#ignore_sources.rust = ['omni'] let g:deoplete#ignore_sources.perl = ['omni'] call deoplete#custom#set('go', 'mark', '') +call deoplete#custom#set('go', 'rank', 9999) call deoplete#custom#set('clang2', 'mark', '') call deoplete#custom#set('racer', 'mark', '') if g:spacevim_enable_javacomplete2_py From b9105b575dd0060a504f5688cbd91fd9f10ec57b Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 22:49:15 +0800 Subject: [PATCH 32/40] Fix goyo support --- README.md | 2 +- autoload/SpaceVim/default.vim | 4 +++- autoload/SpaceVim/layers/tools.vim | 1 + config/plugins/goyo.vim | 24 ++++++++++++++++-------- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a6d942b01..ca8576f35 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ - [Awesome ui](#awesome-ui) - [Language specific mode](#language-specific-mode) - [c/c++ support](#cc-support) + - python support - [go support](#go-support) - rust support - php support - - python support - perl support - lua support - [Unite centric work-flow](#unite-centric-work-flow) diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index db662e66a..98a10d622 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -27,6 +27,9 @@ function! SpaceVim#default#SetOptions() abort set relativenumber set number + " hide cmd + set noshowcmd + " indent set autoindent set smartindent @@ -78,7 +81,6 @@ function! SpaceVim#default#SetOptions() abort set nowritebackup set matchtime=0 set ruler - set showcmd set showmatch set showmode "menuone: show the pupmenu when only one match diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim index 0612a5bb4..722e67b70 100644 --- a/autoload/SpaceVim/layers/tools.vim +++ b/autoload/SpaceVim/layers/tools.vim @@ -4,6 +4,7 @@ function! SpaceVim#layers#tools#plugins() abort \ ['wsdjeg/vim-cheat', { 'on_cmd' : 'Cheat'}], \ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}], \ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}], + \ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}], \ ['Yggdroot/LeaderF', {'merged' : 0}], \ ['google/vim-searchindex'], \ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}], diff --git a/config/plugins/goyo.vim b/config/plugins/goyo.vim index 6e638f3fb..ea1f02ad5 100644 --- a/config/plugins/goyo.vim +++ b/config/plugins/goyo.vim @@ -1,18 +1,26 @@ +let s:save_option = {} function! s:goyo_enter() - silent !tmux set status off + let s:save_option['showmode'] = &showmode + let s:save_option['showcmd'] = &showcmd + let s:save_option['scrolloff'] = &scrolloff set noshowmode set noshowcmd set scrolloff=999 - Limelight + if exists(':Limelight') == 2 + Limelight + let s:save_option['limelight'] = 1 + endif endfunction function! s:goyo_leave() - silent !tmux set status on - set showmode - set showcmd - set scrolloff=5 + let &showmode = s:save_option['showmode'] + let &showcmd = s:save_option['showcmd'] + let &scrolloff = s:save_option['scrolloff'] + if get(s:save_option,'limelight', 0) + execute 'Limelight!' + endif endfunction augroup goyo_map -autocmd! User GoyoEnter nested call <SID>goyo_enter() -autocmd! User GoyoLeave nested call <SID>goyo_leave() + autocmd! User GoyoEnter nested call <SID>goyo_enter() + autocmd! User GoyoLeave nested call <SID>goyo_leave() augroup END From 43289d80160403add1f46d503f30654bd7840c80 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Wed, 1 Feb 2017 23:10:59 +0800 Subject: [PATCH 33/40] Fix markdown tagbar support --- config/plugins/tagbar.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/plugins/tagbar.vim b/config/plugins/tagbar.vim index 6b95bf5d2..2a69e2c12 100644 --- a/config/plugins/tagbar.vim +++ b/config/plugins/tagbar.vim @@ -1,2 +1,12 @@ let g:tagbar_width=30 let g:tagbar_left = 1 + + +let g:tagbar_type_markdown = { + \ 'ctagstype' : 'markdown', + \ 'kinds' : [ + \ 'h:headings', + \ ], + \ 'sort' : 0 +\ } + From 91b3dd85c30551a910949bdf3ed8f2bab11942ae Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Thu, 2 Feb 2017 00:55:16 +0800 Subject: [PATCH 34/40] Fix welcome --- autoload/SpaceVim.vim | 8 +++++--- autoload/SpaceVim/layers/ui.vim | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 0ae562abe..a30a9ddee 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -313,9 +313,11 @@ endfunction function! SpaceVim#welcome() abort - VimFiler - wincmd p - Startify + if exists(':VimFiler') == 2 && exists(':Startify') == 2 + VimFiler + wincmd p + Startify + endif endfunction "" diff --git a/autoload/SpaceVim/layers/ui.vim b/autoload/SpaceVim/layers/ui.vim index c9344897f..2bedbe077 100644 --- a/autoload/SpaceVim/layers/ui.vim +++ b/autoload/SpaceVim/layers/ui.vim @@ -4,6 +4,7 @@ function! SpaceVim#layers#ui#plugins() abort \ ['Yggdroot/indentLine'], \ ['mhinz/vim-signify'], \ ['majutsushi/tagbar', {'loadconf' : 1}], + \ ['lvht/tagbar-markdown',{'merged' : 0}], \ ['vim-airline/vim-airline', { 'merged' : 0, 'loadconf' : 1}], \ ['vim-airline/vim-airline-themes', { 'merged' : 0}], \ ['mhinz/vim-startify', {'loadconf' : 1}], From e13064aaf01ed8dc1f719a4e14bd062a7da4fb4e Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Thu, 2 Feb 2017 01:57:06 +0800 Subject: [PATCH 35/40] Add python layer doc --- README.md | 5 +++-- autoload/SpaceVim/layers/edit.vim | 1 + autoload/SpaceVim/layers/lang/python.vim | 9 +++++++++ autoload/SpaceVim/layers/unite.vim | 1 + doc/SpaceVim.txt | 15 +++++++++++++-- 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ca8576f35..526027e18 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ - [Awesome ui](#awesome-ui) - [Language specific mode](#language-specific-mode) - [c/c++ support](#cc-support) - - python support + - [python support](#python-support) - [go support](#go-support) - rust support - php support @@ -138,10 +138,11 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim ###### go support 1. code completion:  - 2. syntax check:  +###### python support + ##### Neovim centric - Dark powered mode of SpaceVim. By default, SpaceVim use these dark powered plugins: diff --git a/autoload/SpaceVim/layers/edit.vim b/autoload/SpaceVim/layers/edit.vim index fc552dc9e..0c4e5900f 100644 --- a/autoload/SpaceVim/layers/edit.vim +++ b/autoload/SpaceVim/layers/edit.vim @@ -1,6 +1,7 @@ function! SpaceVim#layers#edit#plugins() abort let plugins = [ \ ['tpope/vim-surround'], + \ ['junegunn/vim-emoji'], \ ['terryma/vim-multiple-cursors'], \ ['scrooloose/nerdcommenter'], \ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}], diff --git a/autoload/SpaceVim/layers/lang/python.vim b/autoload/SpaceVim/layers/lang/python.vim index fdc066618..e1df7be5e 100644 --- a/autoload/SpaceVim/layers/lang/python.vim +++ b/autoload/SpaceVim/layers/lang/python.vim @@ -1,3 +1,12 @@ +"" +" @section lang#python, layer-lang-python +" @parentsection layers +" To make this layer works well, you should install jedi. +" @subsection mappings +" > +" mode key function +" < + function! SpaceVim#layers#lang#python#plugins() abort let plugins = [] " python diff --git a/autoload/SpaceVim/layers/unite.vim b/autoload/SpaceVim/layers/unite.vim index f7091e7f9..5403f37d5 100644 --- a/autoload/SpaceVim/layers/unite.vim +++ b/autoload/SpaceVim/layers/unite.vim @@ -21,6 +21,7 @@ function! SpaceVim#layers#unite#plugins() abort \ ['heavenshell/unite-zf'], \ ['heavenshell/unite-sf2'], \ ['osyo-manga/unite-vimpatches'], + \ ['rhysd/unite-emoji.vim'], \ ['Shougo/unite-outline'], \ ['hewes/unite-gtags' ,{'loadconf' : 1}], \ ['rafi/vim-unite-issue'], diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 02b49c298..f78bf9656 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -13,8 +13,9 @@ CONTENTS *SpaceVim-contents* 4. lang#go......................................|SpaceVim-layer-lang-go| 5. lang#java..................................|SpaceVim-layer-lang-java| 6. lang#php....................................|SpaceVim-layer-lang-php| - 7. lang#rust..................................|SpaceVim-layer-lang-rust| - 8. lang#xml....................................|SpaceVim-layer-lang-xml| + 7. lang#python..............................|SpaceVim-layer-lang-python| + 8. lang#rust..................................|SpaceVim-layer-lang-rust| + 9. lang#xml....................................|SpaceVim-layer-lang-xml| 5. FAQ........................................................|SpaceVim-faq| ============================================================================== @@ -497,6 +498,16 @@ requirement: Composer Project < +============================================================================== +LANG#PYTHON *SpaceVim-layer-lang-python* + +To make this layer works well, you should install jedi. +MAPPINGS + +> + mode key function +< + ============================================================================== LANG#RUST *SpaceVim-layer-lang-rust* From 16c2a46ab5fcf65b4baa51e7bf9564361e71f7bc Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Thu, 2 Feb 2017 13:11:28 +0800 Subject: [PATCH 36/40] Add python pictures --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 526027e18..26a0930c7 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,10 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim  ###### python support +1. code completion: +  +2. syntax check: +  ##### Neovim centric - Dark powered mode of SpaceVim. From b84796485f26613ae872cfbfe4f67b8d0e26556c Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Thu, 2 Feb 2017 13:56:55 +0800 Subject: [PATCH 37/40] Add health check --- autoload/SpaceVim/health.vim | 18 ++++++++++++++++++ autoload/SpaceVim/health/clipboard.vim | 0 autoload/SpaceVim/health/lua.vim | 0 autoload/SpaceVim/health/python.vim | 0 4 files changed, 18 insertions(+) create mode 100644 autoload/SpaceVim/health.vim create mode 100644 autoload/SpaceVim/health/clipboard.vim create mode 100644 autoload/SpaceVim/health/lua.vim create mode 100644 autoload/SpaceVim/health/python.vim diff --git a/autoload/SpaceVim/health.vim b/autoload/SpaceVim/health.vim new file mode 100644 index 000000000..29419465a --- /dev/null +++ b/autoload/SpaceVim/health.vim @@ -0,0 +1,18 @@ +function! SpaceVim#health#report() abort + let items = map(SpaceVim#util#globpath(&rtp,'autoload/SpaceVim/health/*'), "fnamemodify(v:val,':t:r')") + let report = [] + for item in items + try + let result = SpaceVim#health#{item}#check() + call extend(report,result) + catch /^Vim\%((\a\+)\)\=:E117/ + call extend(report,[ + \ '', + \ 'SpaceVim Health Error:', + \ ' There is no function: SpaceVim#health#' . item . '#check()', + \ '', + \ ]) + endtry + endfor + return join(report, "\n") +endfunction diff --git a/autoload/SpaceVim/health/clipboard.vim b/autoload/SpaceVim/health/clipboard.vim new file mode 100644 index 000000000..e69de29bb diff --git a/autoload/SpaceVim/health/lua.vim b/autoload/SpaceVim/health/lua.vim new file mode 100644 index 000000000..e69de29bb diff --git a/autoload/SpaceVim/health/python.vim b/autoload/SpaceVim/health/python.vim new file mode 100644 index 000000000..e69de29bb From bc7bbc4a1121a6bd23532ace2aa9411e694a6f14 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Thu, 2 Feb 2017 14:48:36 +0800 Subject: [PATCH 38/40] Improve logger --- .github/ISSUE_TEMPLATE.md | 14 ++++------ autoload/SpaceVim/health/python.vim | 41 +++++++++++++++++++++++++++++ autoload/SpaceVim/logger.vim | 18 ++++++++++--- 3 files changed, 60 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 40ef36a3c..5a83a8186 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,19 +1,15 @@ -### Expected behavior, english is recommend +## Expected behavior, english is recommend -### Environment Information +## Environment Information - OS: - vim version: - neovim version: -### The reproduce ways from Vim starting (Required!) +## The reproduce ways from Vim starting (Required!) -### Output of the ":message" command, and ":echo SpaceVim#logger#viewLog()" +## Output of the ":message" command, and ":echo SpaceVim#logger#viewLog()" -```log -please post log here: +please post log below, if you want me reproduce your issue quickly, post your custom config here will be better. - - -``` diff --git a/autoload/SpaceVim/health/python.vim b/autoload/SpaceVim/health/python.vim index e69de29bb..f1cb7ddbc 100644 --- a/autoload/SpaceVim/health/python.vim +++ b/autoload/SpaceVim/health/python.vim @@ -0,0 +1,41 @@ +function! SpaceVim#health#python#check() abort + let result = ['SpaceVim python support check report:'] + if has('nvim') + call add(result, 'Checking +python3:') + if has('python3') + call add(result, ' SUCCEED!') + else + call add(result, ' Failed : to support +python3, you need run `pip3 install neovim`') + endif + call add(result, 'Checking +python:') + if has('python') + call add(result, ' SUCCEED!') + else + call add(result, ' Failed : to support +python, you need run `pip2 install neovim`') + endif + else + call add(result, 'Checking +python3:') + if has('python3') + call add(result, ' SUCCEED!') + else + if !WINDOWS() + call add(result, ' Failed : to support +python3, Please install vim-gik, or build from sources.') + else + call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases') + call add(result, ' install python3, make sure you have `python` in your path.') + endif + endif + call add(result, 'Checking +python:') + if has('python') + call add(result, ' SUCCEED!') + else + if !WINDOWS() + call add(result, ' Failed : to support +python, Please install vim-gik, or build from sources.') + else + call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases') + call add(result, ' install python3, make sure you have `python` in your path.') + endif + endif + endif + return result +endfunction diff --git a/autoload/SpaceVim/logger.vim b/autoload/SpaceVim/logger.vim index 08cc06067..c6b7369c2 100644 --- a/autoload/SpaceVim/logger.vim +++ b/autoload/SpaceVim/logger.vim @@ -47,19 +47,29 @@ endfunction function! SpaceVim#logger#viewLog(...) abort - let info = "SpaceVim Options :\n\n" + let info = "### SpaceVim Options :\n\n" + let info .= "```viml\n" let info .= join(SpaceVim#options#list(), "\n") - let info .= "\n" + let info .= "\n```\n" + let info .= "\n\n" + + let info .= "### SpaceVim Health checking :\n\n" + let info .= SpaceVim#health#report() + let info .= "\n\n" + + let info .= "### SpaceVim runtime log :\n\n" + let info .= "```log\n" let l = a:0 > 0 ? a:1 : 1 if filereadable(s:logger_file) let logs = readfile(s:logger_file, '') - return info . join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n") + let info .= join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n") else let info .= '[ SpaceVim ] : logger file ' . s:logger_file . ' does not exists, only log for current process will be shown!' let info .= join(filter(s:log_temp, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n") - return info endif + let info .= "\n```\n" + return info endfunction "" From 542715db7471eb75d80b6b2c035758d962595173 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Thu, 2 Feb 2017 15:07:56 +0800 Subject: [PATCH 39/40] Add sections --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 26a0930c7..6e1042d65 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,11 @@ - Central location for tags - Lightweight simple status/tabline - Premium color-schemes -- Custom configuration -- Support SpaceVim - - contribute to SpaceVim +- [Custom configuration](#custom-configuration) +- [Support SpaceVim](#support-spacevim) + - [Report bugs](#report-bugs) + - [contribute to SpaceVim](#contribute-to-spacevim) - Write post about SpaceVim - - Report bugs #### Introduction @@ -607,6 +607,14 @@ let g:spacevim_custom_plugins = [ nnoremap <c-l> :Ydc<cr> ``` +#### Support SpaceVim + +##### report bugs + +If you get any issues, please open an issue with the ISSUE_TEMPLATE. It is useful for me to debug for this issue. + +##### contribute to SpaceVim + #### Enjoy! #### Credits & Thanks From b946f46f51e8b130ad6d37462fb21730777b9321 Mon Sep 17 00:00:00 2001 From: wsdjeg <wsdjeg@163.com> Date: Thu, 2 Feb 2017 21:44:53 +0800 Subject: [PATCH 40/40] Fix #196 --- autoload/SpaceVim/layers/tools.vim | 6 ++++++ autoload/SpaceVim/plugins.vim | 4 ---- autoload/zvim/plug.vim | 4 ++++ config/plugins_before/vim-bookmarks.vim | 9 +++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 config/plugins_before/vim-bookmarks.vim diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim index 722e67b70..586d2d292 100644 --- a/autoload/SpaceVim/layers/tools.vim +++ b/autoload/SpaceVim/layers/tools.vim @@ -6,6 +6,7 @@ function! SpaceVim#layers#tools#plugins() abort \ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}], \ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}], \ ['Yggdroot/LeaderF', {'merged' : 0}], + \ ['MattesGroeger/vim-bookmarks', { 'on_map' : '<Plug>Bookmark', 'loadconf_before' : 1}], \ ['google/vim-searchindex'], \ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}], \ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}], @@ -34,6 +35,11 @@ function! SpaceVim#layers#tools#plugins() abort endfunction function! SpaceVim#layers#tools#config() abort + nmap mm <Plug>BookmarkToggle + nmap mi <Plug>BookmarkAnnotate + nmap ma <Plug>BookmarkShowAll + nmap mn <Plug>BookmarkNext + nmap mp <Plug>BookmarkPrev nnoremap <silent> <F7> :MundoToggle<CR> augroup rainbow_lisp autocmd! diff --git a/autoload/SpaceVim/plugins.vim b/autoload/SpaceVim/plugins.vim index a65ba61c0..eb05d6033 100644 --- a/autoload/SpaceVim/plugins.vim +++ b/autoload/SpaceVim/plugins.vim @@ -11,7 +11,6 @@ function! SpaceVim#plugins#load() abort endfunction function! s:load_plugins() abort for group in g:spacevim_plugin_groups - let g:spacevim_plugin_layer = group for plugin in s:getLayerPlugins(group) if len(plugin) == 2 call zvim#plug#add(plugin[0], plugin[1]) @@ -27,9 +26,6 @@ function! s:load_plugins() abort endfor call s:loadLayerConfig(group) endfor - if exists('g:spacevim_plugin_layer') - unlet g:spacevim_plugin_layer - endif for plugin in g:spacevim_custom_plugins if len(plugin) == 2 call zvim#plug#add(plugin[0], plugin[1]) diff --git a/autoload/zvim/plug.vim b/autoload/zvim/plug.vim index c235aee82..c5916e479 100644 --- a/autoload/zvim/plug.vim +++ b/autoload/zvim/plug.vim @@ -150,20 +150,24 @@ fu! s:parser(args) endf function! zvim#plug#add(repo,...) abort + let g:spacevim_plugin_name = '' if g:spacevim_plugin_manager == 'neobundle' exec 'NeoBundle "'.a:repo.'"'.','.join(a:000,',') + let g:spacevim_plugin_name = split(a:repo, '/')[-1] elseif g:spacevim_plugin_manager == 'dein' if len(a:000) > 0 call dein#add(a:repo,s:parser(a:000[0])) else call dein#add(a:repo) endif + let g:spacevim_plugin_name = g:dein#name elseif g:spacevim_plugin_manager == 'vim-plug' if len(a:000) > 0 exec "Plug '".a:repo."', ".join(a:000,',') else exec "Plug '".a:repo."'" endif + let g:spacevim_plugin_name = split(a:repo, '/')[-1] endif let str = get(g:,'spacevim_plugin_layer', 'custom plugin') let str = '[' . str . ']' diff --git a/config/plugins_before/vim-bookmarks.vim b/config/plugins_before/vim-bookmarks.vim new file mode 100644 index 000000000..17a58c73a --- /dev/null +++ b/config/plugins_before/vim-bookmarks.vim @@ -0,0 +1,9 @@ +nmap <Leader><Leader> <Plug>BookmarkToggle +nmap <Leader>i <Plug>BookmarkAnnotate +nmap <Leader>a <Plug>BookmarkShowAll +nmap <Leader>j <Plug>BookmarkNext +nmap <Leader>k <Plug>BookmarkPrev +nmap <Leader>c <Plug>BookmarkClear +nmap <Leader>x <Plug>BookmarkClearAll +nmap <Leader>kk <Plug>BookmarkMoveUp +nmap <Leader>jj <Plug>BookmarkMoveDown