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/README.md b/README.md index 1cecf9c85..6e1042d65 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

SpaceVim

+

SpaceVim

[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev)](https://travis-ci.org/SpaceVim/SpaceVim) ![Version 0.1.0-dev](https://img.shields.io/badge/version-0.1.0--dev-yellow.svg?style=flat-square) @@ -13,10 +13,44 @@ [![GitHub forks](https://img.shields.io/github/forks/SpaceVim/SpaceVim.svg?style=social&label=Fork)](https://github.com/SpaceVim/SpaceVim) [![Twitter Follow](https://img.shields.io/twitter/follow/SpaceVim.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/SpaceVim) -![2017-01-07_1363x723](https://cloud.githubusercontent.com/assets/13142418/21739011/6c38c14e-d4ca-11e6-8f3e-2c21dfc489c0.png) +![2017-02-01_1359x720](https://cloud.githubusercontent.com/assets/13142418/22506984/38c627ae-e8be-11e6-8f9c-37e260d069a7.png) + +### Table of Contents +- [Introduction](#introduction) +- [Install](#install) + - [Linux/Mac](#linuxmac) + - [Windows support](#windows-support) +- [File Structure](#file-structure) +- Features + - [Awesome ui](#awesome-ui) + - [Language specific mode](#language-specific-mode) + - [c/c++ support](#cc-support) + - [python support](#python-support) + - [go support](#go-support) + - rust support + - php 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 + - Premium color-schemes +- [Custom configuration](#custom-configuration) +- [Support SpaceVim](#support-spacevim) + - [Report bugs](#report-bugs) + - [contribute to SpaceVim](#contribute-to-spacevim) + - Write post about SpaceVim + +#### 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 +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. @@ -30,12 +64,14 @@ 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 ``` 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,8 +85,8 @@ 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 @@ -58,28 +94,13 @@ 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 ``` -#### 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 @@ -97,88 +118,112 @@ 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 + +##### Awesome ui + +- outline + filemanager + checker + ![2017-02-01_1360x721](https://cloud.githubusercontent.com/assets/13142418/22506638/84705532-e8bc-11e6-8b72-edbdaf08426b.png) + +##### Language specific mode + +###### c/c++ support + +1. code completion: autocompletion and fuzzy match. + ![2017-02-01_1359x720](https://cloud.githubusercontent.com/assets/13142418/22505960/df9068de-e8b8-11e6-943e-d79ceca095f1.png) +2. syntax check: Asynchronous linting and make framework. + ![2017-02-01_1359x722](https://cloud.githubusercontent.com/assets/13142418/22506340/e28b4782-e8ba-11e6-974b-ca29574dcc1f.png) + +###### go support +1. code completion: + ![2017-02-01_1360x721](https://cloud.githubusercontent.com/assets/13142418/22508345/8215c5e4-e8c4-11e6-95ec-f2a6e1e2f4d2.png) +2. syntax check: + ![2017-02-01_1359x720](https://cloud.githubusercontent.com/assets/13142418/22509944/108b6508-e8cb-11e6-8104-6310a29ae796.png) + +###### python support +1. code completion: + ![2017-02-02_1360x724](https://cloud.githubusercontent.com/assets/13142418/22537799/7d1d47fe-e948-11e6-8168-a82e3f688554.png) +2. syntax check: + ![2017-02-02_1358x720](https://cloud.githubusercontent.com/assets/13142418/22537883/36de7b5e-e949-11e6-866f-73c48e8f59aa.png) + +##### Neovim centric - Dark powered mode of SpaceVim. + +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 + +TODO: + +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 - 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`. -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, - default action is open the github website of current plugin. default key is `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 `lp` ![2017-01-21_1358x725](https://cloud.githubusercontent.com/assets/13142418/22175019/ce42d902-e027-11e6-89cd-4f44f70a10cd.png) - List all the mappings and description: `f` - ![2016-12-29-22 35 29](https://cloud.githubusercontent.com/assets/13142418/21546066/4896c5e2-ce17-11e6-8246-945b924df9aa.png) + ![2017-02-01_1359x723](https://cloud.githubusercontent.com/assets/13142418/22507351/24af0d74-e8c0-11e6-985e-4a1404b629ed.png) - List all the starred repos in github.com, fuzzy find and open the website of the repo. default key is `ls` - ![2016-12-29-22 38 52](https://cloud.githubusercontent.com/assets/13142418/21546148/c6836618-ce17-11e6-82a9-81e90017dbf1.png) - -#### Awesome ui -- outline + filemanager + checker - ![2017-01-03-21 26 03](https://cloud.githubusercontent.com/assets/13142418/21609104/74567ce4-d1fb-11e6-9495-16aa5ad2e42d.png) - -#### Language specific mode -- java -- viml -- rust -- php -- c/c++ -- js -- python - + ![2017-02-01_1359x722](https://cloud.githubusercontent.com/assets/13142418/22506915/deb99caa-e8bd-11e6-9b80-316281ddb48c.png) #### Plugin Highlights @@ -282,7 +327,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 @@ -513,18 +558,16 @@ Key | Mode | Action ``+`gd` | Normal | Git diff ``+`gc` | Normal | Git commit ``+`gb` | Normal | Git blame -``+`gB` | Normal | Open in browser ``+`gp` | Normal | Git push -##### Plugin: GitGutter +##### Plugin: vim-signify Key | Mode | Action ----- |:----:| ------------------ -``+`hj` | Normal | Jump to next hunk -``+`hk` | Normal | Jump to previous hunk -``+`hs` | Normal | Stage hunk -``+`hr` | Normal | Revert hunk -``+`hp` | Normal | Preview hunk +``+`hj` / `]c` | Normal | Jump to next hunk +``+`hk` / `[c` | Normal | Jump to previous hunk +``+`hJ` / `]C` | Normal | Jump to last hunk +``+`hK` / `[C` | Normal | Jump to first hunk ##### Misc Plugins @@ -538,6 +581,40 @@ Key | Mode | Action ``+`W` | Normal | Wiki ``+`K` | Normal | Thesaurus +#### Custom configuration +SpaceVim use `~/.SpaceVim.d/init.vim` as default global init file. you can set +SpaceVim-options or config layers in it. SpaceVim also will add `~/.SpaceVim.d/` +into runtimepath. so you can write your own vim script in it. + +SpaceVim also support local config file for project, the init file is `.SpaceVim.d/init.vim` +in the root of your project. `.SpaceVim.d/` will also be added into runtimepath. + +here is an example config file for SpaceVim: +```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 :Ydc +``` + +#### 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 diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 9f84333f8..a30a9ddee 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. " @@ -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' "" @@ -306,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/default.vim b/autoload/SpaceVim/default.vim index 471907ffe..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 @@ -44,6 +47,9 @@ function! SpaceVim#default#SetOptions() abort set softtabstop=4 set shiftwidth=4 + " autoread + set autoread + " backup set backup set undofile @@ -75,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 @@ -362,6 +367,7 @@ function! SpaceVim#default#SetMappings() abort call SpaceVim#mapping#def('nnoremap ', 'sg', ':vsplit:wincmd p:e#', \'Open previous buffer in vsplit window' , 'vsplit|wincmd p|e#') call SpaceVim#mapping#def('nnoremap ', 'gf', ':call zvim#gf()', 'Jump to a file under cursor', '') + call SpaceVim#mapping#def('nnoremap ', 'gd', ':call SpaceVim#mapping#gd()', 'Goto declaration', '') endfunction fu! s:tobur(num) abort 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..f1cb7ddbc --- /dev/null +++ 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/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index 33ada32e3..b7a470973 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -1,5 +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 @@ -7,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|. @@ -15,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/colorscheme.vim b/autoload/SpaceVim/layers/colorscheme.vim index 90453c2b1..2562a96d8 100644 --- a/autoload/SpaceVim/layers/colorscheme.vim +++ b/autoload/SpaceVim/layers/colorscheme.vim @@ -1,5 +1,6 @@ "" -" @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/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/git.vim b/autoload/SpaceVim/layers/git.vim index 0c8c51170..d16df70fa 100644 --- a/autoload/SpaceVim/layers/git.vim +++ b/autoload/SpaceVim/layers/git.vim @@ -10,5 +10,17 @@ endfunction function! SpaceVim#layers#git#config() abort - + nnoremap gs :Gita status + nnoremap gd :Gita diff + nnoremap gc :Gita commit + nnoremap gb :Gita blame + nnoremap gp :Gita push + nmap hj (signify-next-hunk) + nmap hk (signify-prev-hunk) + nmap hJ 9999gj + nmap hK 9999gk + augroup spacevim_layer_git + autocmd! + autocmd FileType diff nnoremap q :bd! + augroup END endfunction diff --git a/autoload/SpaceVim/layers/lang.vim b/autoload/SpaceVim/layers/lang.vim index 8aee52f64..ec2e50632 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']}], @@ -25,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/c.vim b/autoload/SpaceVim/layers/lang/c.vim index 58a5679bc..44161d7d6 100644 --- a/autoload/SpaceVim/layers/lang/c.vim +++ b/autoload/SpaceVim/layers/lang/c.vim @@ -1,5 +1,6 @@ "" -" @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/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 gi go implements +" normal gf go info +" normal ge go rename +" normal gr go run +" normal gb go build +" normal gt go test +" normal gd go doc +" normal gv go doc vertical +" normal 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 s (go-implements) - au FileType go nmap i (go-info) - au FileType go nmap e (go-rename) - au FileType go nmap r (go-run) - au FileType go nmap b (go-build) - au FileType go nmap t (go-test) - au FileType go nmap gd (go-doc) - au FileType go nmap gv (go-doc-vertical) - au FileType go nmap co (go-coverage) + au FileType go nmap s (go-implements) + au FileType go nmap i (go-info) + au FileType go nmap e (go-rename) + au FileType go nmap r (go-run) + au FileType go nmap b (go-build) + au FileType go nmap t (go-test) + au FileType go nmap gd (go-doc) + au FileType go nmap gv (go-doc-vertical) + au FileType go nmap co (go-coverage) augroup END endfunction diff --git a/autoload/SpaceVim/layers/lang/java.vim b/autoload/SpaceVim/layers/lang/java.vim index 6202f018f..5a732c1f4 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 +" @section 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..d3d9d4b1f 100644 --- a/autoload/SpaceVim/layers/lang/php.vim +++ b/autoload/SpaceVim/layers/lang/php.vim @@ -1,5 +1,6 @@ "" -" @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/python.vim b/autoload/SpaceVim/layers/lang/python.vim new file mode 100644 index 000000000..e1df7be5e --- /dev/null +++ b/autoload/SpaceVim/layers/lang/python.vim @@ -0,0 +1,19 @@ +"" +" @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 + 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/rust.vim b/autoload/SpaceVim/layers/lang/rust.vim index 94a53c92a..43fa3e62f 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 +" @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/vim.vim b/autoload/SpaceVim/layers/lang/vim.vim new file mode 100644 index 000000000..1aa54ca52 --- /dev/null +++ b/autoload/SpaceVim/layers/lang/vim.vim @@ -0,0 +1,12 @@ +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 + +function! SpaceVim#layers#lang#vim#config() abort + call SpaceVim#mapping#gd#add('vim','lookup#lookup') +endfunction diff --git a/autoload/SpaceVim/layers/lang/xml.vim b/autoload/SpaceVim/layers/lang/xml.vim new file mode 100644 index 000000000..adb00e0ca --- /dev/null +++ b/autoload/SpaceVim/layers/lang/xml.vim @@ -0,0 +1,18 @@ +"" +" @section lang#xml, layer-lang-xml +" @parentsection layers +" 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 + let plugins = [] + call add(plugins,['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) + call add(plugins,['sukima/xmledit', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}]) + return plugins +endfunction + +function! SpaceVim#layers#lang#xml#config() abort + +endfunction diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim index 37d0af92d..586d2d292 100644 --- a/autoload/SpaceVim/layers/tools.vim +++ b/autoload/SpaceVim/layers/tools.vim @@ -4,9 +4,10 @@ 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}], + \ ['MattesGroeger/vim-bookmarks', { 'on_map' : 'Bookmark', 'loadconf_before' : 1}], \ ['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} ], @@ -34,6 +35,11 @@ function! SpaceVim#layers#tools#plugins() abort endfunction function! SpaceVim#layers#tools#config() abort + nmap mm BookmarkToggle + nmap mi BookmarkAnnotate + nmap ma BookmarkShowAll + nmap mn BookmarkNext + nmap mp BookmarkPrev nnoremap :MundoToggle augroup rainbow_lisp autocmd! 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}], 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/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 "" 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 "\" 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 diff --git a/autoload/SpaceVim/options.vim b/autoload/SpaceVim/options.vim index 3a6a2cf2e..2c04827cc 100644 --- a/autoload/SpaceVim/options.vim +++ b/autoload/SpaceVim/options.vim @@ -1,11 +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 - call add(list, 'your vim is too old, getcompletion() need patch7-4-2010') + 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 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/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 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 goyo_enter() -autocmd! User GoyoLeave nested call goyo_leave() + autocmd! User GoyoEnter nested call goyo_enter() + autocmd! User GoyoLeave nested call goyo_leave() augroup END 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 +\ } + 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 gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('') -nnoremap gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context' +"nnoremap gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('') +"nnoremap gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context' nnoremap gr :execute 'Unite -auto-preview -start-insert -no-split gtags/ref' nnoremap gg :execute 'Unite -auto-preview -start-insert -no-split gtags/grep' -nnoremap gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion' +"nnoremap gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion' vnoremap gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.GetVisualSelection() let g:unite_source_gtags_project_config = { \ '_': { 'treelize': 0 } 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 BookmarkToggle +nmap i BookmarkAnnotate +nmap a BookmarkShowAll +nmap j BookmarkNext +nmap k BookmarkPrev +nmap c BookmarkClear +nmap x BookmarkClearAll +nmap kk BookmarkMoveUp +nmap jj BookmarkMoveDown diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 08368ba90..f78bf9656 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -7,13 +7,16 @@ 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. lang#c........................................|SpaceVim-layer-lang-c| + 4. lang#go......................................|SpaceVim-layer-lang-go| + 5. lang#java..................................|SpaceVim-layer-lang-java| + 6. lang#php....................................|SpaceVim-layer-lang-php| + 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| ============================================================================== INTRODUCTION *SpaceVim-intro* @@ -119,6 +122,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. @@ -237,6 +247,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 @@ -245,6 +256,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* @@ -377,58 +392,7 @@ colorschemes: if the colorscheme you want do not list below, PR welcome. < ============================================================================== -LAYER_LANG_JAVA *SpaceVim-layer_lang_java* - -This layer is for java development. -> - import-mappings: - mode key function - normal import class under corsor. - insert import class under corsor. - normal jI import missing classes. - normal jR remove unused imports. - normal ji smart import class under corsor. - normal jii same as - insert I import missing imports. - insert R remove unused imports. - insert i smart import class under corsor. - insert ii add import for class under corsor. - - generate-mappings: - mode key function - normal jA generate accessors. - normal js generate setter accessor. - normal jg generate getter accessor. - normal ja generate setter and getter accessor. - normal jts generate toString function. - normal jeq generate equals and hashcode function. - normal jc generate constructor. - normal jcc generate default constructor. - insert s generate setter accessor. - insert g generate getter accessor. - insert a generate getter and setter accessor. - visual js generate setter accessor. - visual jg generate getter accessor. - visual ja generate setter and getter acctssor. -< - - -============================================================================== -LAYER_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. - -requirement: -> - PHP 5.3+ - PCNTL Extension - Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension - Composer Project -< - -============================================================================== -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. @@ -465,7 +429,87 @@ setting it to 0 disables this feature. ============================================================================== -LAYER-LANG-RUST *SpaceVim-layer-lang-rust* +LANG#GO *SpaceVim-layer-lang-go* + +This layer support go development, include code completion and syntax check. +MAPPINGS + +> + mode key function + normal gi go implements + normal gf go info + normal ge go rename + normal gr go run + normal gb go build + normal gt go test + normal gd go doc + normal gv go doc vertical + normal gco go coverage +< + +============================================================================== +LANG#JAVA *SpaceVim-layer-lang-java* + +This layer is for java development. +> + import-mappings: + mode key function + normal import class under corsor. + insert import class under corsor. + normal jI import missing classes. + normal jR remove unused imports. + normal ji smart import class under corsor. + normal jii same as + insert I import missing imports. + insert R remove unused imports. + insert i smart import class under corsor. + insert ii add import for class under corsor. + + generate-mappings: + mode key function + normal jA generate accessors. + normal js generate setter accessor. + normal jg generate getter accessor. + normal ja generate setter and getter accessor. + normal jts generate toString function. + normal jeq generate equals and hashcode function. + normal jc generate constructor. + normal jcc generate default constructor. + insert s generate setter accessor. + insert g generate getter accessor. + insert a generate getter and setter accessor. + visual js generate setter accessor. + visual jg generate getter accessor. + visual ja generate setter and getter acctssor. +< + + +============================================================================== +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. + +requirement: +> + PHP 5.3+ + PCNTL Extension + Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension + 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* 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| @@ -491,6 +535,13 @@ mappings: normal 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*