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 c241f129a..251d55fa4 100644
--- a/README.md
+++ b/README.md
@@ -1,47 +1,49 @@
-

+
[](https://travis-ci.org/SpaceVim/SpaceVim)

[](LICENSE)
[](doc/SpaceVim.txt)
-[](https://jq.qq.com/?_wv=1027&k=43DB6SG)
-[](https://gitter.im/SpaceVim/SpaceVim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-[](https://www.facebook.com/SpaceVim)
-[](https://github.com/SpaceVim/SpaceVim)
-[](https://github.com/SpaceVim/SpaceVim)
-[](https://github.com/SpaceVim/SpaceVim)
-[](https://twitter.com/SpaceVim)
-
-
### Table of Contents
- [Introduction](#introduction)
+- [Community](#community)
- [Install](#install)
- [Linux/Mac](#linuxmac)
- [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](#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
-- 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
+- [Credits & Thanks](#credits--thanks)
#### 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, users just need
to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim,
@@ -55,6 +57,18 @@ For learning about Vim in general, read [vim-galore](https://github.com/mhinz/vi
[](https://waffle.io/SpaceVim/SpaceVim/metrics/throughput)
+#### Community
+Try these Neovim hangouts for any questions, problems or comments.
+- Ask
+ - [issue tracker](https://github.com/SpaceVim/SpaceVim/issues) for issue and feature requests
+ - vi StackExchange for "how to" & configuration questions
+ - [](https://twitter.com/SpaceVim) for hugs & pithy comments
+- Chat
+ - [](https://gitter.im/SpaceVim/SpaceVim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+ - [](https://jq.qq.com/?_wv=1027&k=43DB6SG)
+ - [](https://www.facebook.com/SpaceVim)
+- Discuss
+
#### Install
##### Linux/Mac
@@ -114,6 +128,32 @@ 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: autocompletion and fuzzy match.
+ 
+2. syntax check: Asynchronous linting and make framework.
+ 
+
+###### go support
+1. code completion:
+ 
+2. syntax check:
+ 
+
+###### python support
+1. code completion:
+ 
+2. syntax check:
+ 
+
##### Neovim centric - Dark powered mode of SpaceVim.
By default, SpaceVim use these dark powered plugins:
@@ -183,32 +223,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 `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`

- List all the mappings and description: `f`
- 
+ 
- List all the starred repos in github.com, fuzzy find and open the website of the repo. default key is `ls`
- 
-
-#### Awesome ui
-- outline + filemanager + checker
- 
-
-#### Language specific mode
-- java
-- viml
-- rust
-- php
-- c/c++
-- js
-- python
-
+ 
#### Plugin Highlights
@@ -350,7 +372,10 @@ Name | Description
Key | Mode | Action
----- |:----:| ------------------
-``+`y` | Normal/visual | Copy selection to X11 clipboard ("+y)
+``+`y` | visual | Copy selection to X11 clipboard ("+y)
+`Ctrl`+`c` | Normal | Copy full path of current buffer to X11 clipboard
+``+`Ctrl`+`c` | Normal | Copy github.com url of current buffer to X11 clipboard(if it is a github repo)
+``+`Ctrl`+`l` | Normal/visual | Copy github.com url of current lines to X11 clipboard(if it is a github repo)
``+`p` | Normal/visual | Paste selection from X11 clipboard ("+p)
`Ctrl`+`f` | Normal | Smart page forward (C-f/C-d)
`Ctrl`+`b` | Normal | Smart page backwards (C-b/C-u)
@@ -374,10 +399,10 @@ Key | Mode | Action
Key | Mode | Action
----- |:----:| ------------------
-``+`cd` | Normal | Switch to the root directory(vim-rooter)
+``+`cd` | Normal | Switch to the directory of the open buffer
``+`w` | Normal/visual | Write (:w)
-`Ctrl`+`s` | _All_ | Write (:w)
-`W!!` | Command | Write as root
+`Ctrl`+`s` | Normal/visual/Command | Write (:w)
+`:w!!` | Command | Write as root (%!sudo tee > /dev/null %)
##### Editor UI
@@ -427,27 +452,31 @@ Key | Mode | Action
Key | Mode | Action
----- |:----:| ------------------
-`;`+`r` | Normal | Resumes Unite window
-`;`+`f` | Normal | Opens Unite file recursive search
-`;`+`i` | Normal | Opens Unite git file search
-`;`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher)
-`;`+`u` | Normal | Opens Unite source
-`;`+`t` | Normal | Opens Unite tag
-`;`+`T` | Normal | Opens Unite tag/include
-`;`+`l` | Normal | Opens Unite location list
-`;`+`q` | Normal | Opens Unite quick fix
-`;`+`e` | Normal | Opens Unite register
-`;`+`j` | Normal | Opens Unite jump, change
-`;`+`h` | Normal | Opens Unite history/yank
-`;`+`s` | Normal | Opens Unite session
-`;`+`o` | Normal | Opens Unite outline
-`;`+`ma` | Normal | Opens Unite mapping
-`;`+`me` | Normal | Opens Unite output messages
-``+`b` | Normal | Opens Unite buffers, mru, bookmark
+`[unite]` | Normal | unite leader, default is `f`, `:h g:spacevim_unite_leader`
+`[unite]`+`r` | Normal | Resumes Unite window
+`[unite]`+`f` | Normal | Opens Unite file recursive search
+`[unite]`+`i` | Normal | Opens Unite git file search
+`[unite]`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher)
+`[unite]`+`u` | Normal | Opens Unite source
+`[unite]`+`t` | Normal | Opens Unite tag
+`[unite]`+`T` | Normal | Opens Unite tag/include
+`[unite]`+`l` | Normal | Opens Unite location list
+`[unite]`+`q` | Normal | Opens Unite quick fix
+`[unite]`+`e` | Normal | Opens Unite register
+`[unite]`+`j` | Normal | Opens Unite jump, change
+`[unite]`+`h` | Normal | Opens Unite history/yank
+`[unite]`+`s` | Normal | Opens Unite session
+`[unite]`+`n` | Normal | Opens Unite session/new
+`[unite]`+`o` | Normal | Opens Unite outline
+`[unite]`+`c` | Normal | Opens Unite buffer bookmark file in current directory
+`[unite]`+`b` | Normal | Opens Unite buffer bookmark file in buffer directory
+`[unite]`+`ma` | Normal | Opens Unite mapping
+`[unite]`+`` | Normal | Opens Unite menu:CustomKeyMaps
+`[unite]`+`me` | Normal | Opens Unite output messages
+``+`bl` | Normal | Opens Unite buffers, mru, bookmark
``+`ta` | Normal | Opens Unite tab
-``+`gf` | Normal | Opens Unite file with word at cursor
-``+`gt` | Normal/visual | Opens Unite tag with word at cursor
-``+`gg` | Visual | Opens Unite navigate with word at cursor
+``+`ugf` | Normal | Opens Unite file with word at cursor
+``+`ugt` | Normal/visual | Opens Unite tag with word at cursor
| **Within _Unite_ buffers** |||
`Ctrl`+`h/k/l/r` | Normal | Un-map
`Ctrl`+`r` | Normal | Redraw
@@ -575,6 +604,7 @@ SpaceVim also support local config file for project, the init file is `.SpaceVim
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'
@@ -592,9 +622,16 @@ let g:spacevim_custom_plugins = [
nnoremap :Ydc
```
-#### Enjoy!
+#### 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
#### Credits & Thanks
+- [](https://github.com/SpaceVim/SpaceVim/graphs/contributors)
- [vimdoc](https://github.com/google/vimdoc) generate doc file for SpaceVim
- [Rafael Bodill](https://github.com/rafi) and his vim-config
- [Bailey Ling](https://github.com/bling) and his dotvim
diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim
index 0ae562abe..4446bb29a 100644
--- a/autoload/SpaceVim.vim
+++ b/autoload/SpaceVim.vim
@@ -210,6 +210,13 @@ let g:spacevim_enable_powerline_fonts = 1
" let g:spacevim_lint_on_save = 0
" <
let g:spacevim_lint_on_save = 1
+""
+" Enable/Disable Vimfiler in the welcome windows, this will cause vim slow on startup if
+" there are too many files in current directory. you can disable it by:
+" >
+" let g:spacevim_enable_vimfiler_welcome = 0
+" <
+let g:spacevim_enable_vimfiler_welcome = 1
let g:spacevim_smartcloseignorewin = ['__Tagbar__' , 'vimfiler:default']
let g:spacevim_smartcloseignoreft = ['help']
let g:spacevim_altmoveignoreft = ['Tagbar' , 'vimfiler']
@@ -298,6 +305,12 @@ function! SpaceVim#end() abort
let help = fnamemodify(g:Config_Main_Home, ':p:h:h') . '/doc'
exe 'helptags ' . help
+ ""
+ " set language
+ if !empty(g:spacevim_language)
+ silent exec 'lan ' . g:spacevim_language
+ endif
+
call SpaceVim#plugins#load()
endfunction
@@ -313,9 +326,13 @@ endfunction
function! SpaceVim#welcome() abort
- VimFiler
- wincmd p
- Startify
+ if exists(':VimFiler') == 2 && exists(':Startify') == 2
+ if g:spacevim_enable_vimfiler_welcome
+ VimFiler
+ endif
+ wincmd p
+ Startify
+ endif
endfunction
""
diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim
index db662e66a..6031dc224 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
@@ -274,8 +276,8 @@ function! SpaceVim#default#SetMappings() abort
cnoremap
cnoremap
- " When pressing cd switch to the directory of the open buffer
- " map cd :cd %:p:h:pwd "I use RooterChangeToRootDirectory
+ "When pressing cd switch to the directory of the open buffer
+ map cd :cd %:p:h:pwd
" Fast saving
nnoremap w :w
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..e73beed74
--- /dev/null
+++ b/autoload/SpaceVim/health/clipboard.vim
@@ -0,0 +1,24 @@
+function! SpaceVim#health#clipboard#check() abort
+ let result = ['SpaceVim clipboard support check report:']
+ call add(result, 'Checking +clipboard:')
+ if has('nvim')
+ if has('clipboard')
+ call add(result, ' SUCCEED!')
+ else
+ call add(result, ' Failed : to support +clipboard, you need has one of following clipboard tools in your $PATH:')
+ call add(result, ' 1. xclip')
+ call add(result, ' 2. xsel')
+ call add(result, ' 3. pbcopy/pbpaste (Mac OS X)')
+ call add(result, ' 4. lemonade (for SSH) https://github.com/pocke/lemonade')
+ call add(result, ' 5. doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/')
+ endif
+ else
+ if has('clipboard')
+ call add(result, ' SUCCEED!')
+ else
+ call add(result, ' Failed : to support +clipboard, you need recompile your vim with +clipboard support.')
+ endif
+ endif
+
+ return result
+endfunction
diff --git a/autoload/SpaceVim/health/lua.vim b/autoload/SpaceVim/health/lua.vim
new file mode 100644
index 000000000..45bb1904b
--- /dev/null
+++ b/autoload/SpaceVim/health/lua.vim
@@ -0,0 +1,18 @@
+function! SpaceVim#health#lua#check() abort
+ let result = ['SpaceVim lua support check report:']
+ call add(result, 'Checking +lua:')
+ if has('nvim')
+ if has('lua')
+ call add(result, ' SUCCEED!')
+ else
+ call add(result, ' Failed : Known issue, neovim do not support lua now.')
+ endif
+ else
+ if has('lua')
+ call add(result, ' SUCCEED!')
+ else
+ call add(result, ' Failed : to support +lua, you need recompile your vim with +lua support.')
+ endif
+ endif
+ return result
+endfunction
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 b7a470973..f68f8b0b9 100644
--- a/autoload/SpaceVim/layers/autocomplete.vim
+++ b/autoload/SpaceVim/layers/autocomplete.vim
@@ -13,7 +13,10 @@
" @subsection snippet
" SpaceVim use neosnippet as default snippet engine, and the default snippets
" is `Shougo/neosnippet-snippets`. for more information, please read
-" |neosnippet|.
+" |neosnippet|. neosnippet support custtom snippets, and the default snippets
+" directory is `~/.SpaceVim.d/snippets/` and if
+" g:spacevim_force_global_config = 1, SpaceVim will not append
+" `./.SpaceVim.d/snippets` as default snippets directory.
@@ -49,3 +52,11 @@ function! SpaceVim#layers#autocomplete#plugins() abort
endif
return plugins
endfunction
+
+
+function SpaceVim#layers#autocomplete#config()
+ if g:spacevim_autocomplete_method ==# 'ycm'
+ iunmap
+ sunmap
+ endif
+endfunction
diff --git a/autoload/SpaceVim/layers/checkers.vim b/autoload/SpaceVim/layers/checkers.vim
index 1cfff338b..cebf33b62 100644
--- a/autoload/SpaceVim/layers/checkers.vim
+++ b/autoload/SpaceVim/layers/checkers.vim
@@ -1,3 +1,8 @@
+""
+" @section checkers, layer-checkers
+" @parentsection layers
+" SpaceVim use neomake as default syntax checker.
+
function! SpaceVim#layers#checkers#plugins() abort
let plugins = []
diff --git a/autoload/SpaceVim/layers/colorscheme.vim b/autoload/SpaceVim/layers/colorscheme.vim
index 2562a96d8..e9d07dc69 100644
--- a/autoload/SpaceVim/layers/colorscheme.vim
+++ b/autoload/SpaceVim/layers/colorscheme.vim
@@ -160,5 +160,6 @@ function! SpaceVim#layers#colorscheme#plugins() abort
\ ['gregsexton/Atom'],
\ ['gilgigilgil/anderson.vim'],
\ ['romainl/Apprentice'],
+ \ ['icymind/NeoSolarized'],
\ ]
endfunction
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.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/elixir.vim b/autoload/SpaceVim/layers/lang/elixir.vim
new file mode 100644
index 000000000..d555ba96a
--- /dev/null
+++ b/autoload/SpaceVim/layers/lang/elixir.vim
@@ -0,0 +1,14 @@
+""
+" @section lang#elixir, layer-lang-elixir
+" @parentsection layers
+" @subsection Intro
+" lang#elixir layer provide code completion,documentation lookup, jump to
+" definition, mix integration and iex integration for elixir project. SpaceVim
+" use neomake as default syntax checker which is loaded in
+" @section(layer-checkers)
+
+function! SpaceVim#layers#lang#elixir#plugins() abort
+ let plugins = []
+ call add(plugins, ['slashmili/alchemist.vim', {'on_ft' : 'elixir'}])
+ return plugins
+endfunction
diff --git a/autoload/SpaceVim/layers/lang/haskell.vim b/autoload/SpaceVim/layers/lang/haskell.vim
new file mode 100644
index 000000000..33808a8f0
--- /dev/null
+++ b/autoload/SpaceVim/layers/lang/haskell.vim
@@ -0,0 +1,7 @@
+function! SpaceVim#layers#lang#haskell#plugins() abort
+ let plugins = []
+ call add(plugins,['neovimhaskell/haskell-vim', { 'on_ft' : 'haskell'}])
+ call add(plugins,['pbrisbin/vim-syntax-shakespeare', { 'on_ft' : 'haskell'}])
+ call add(plugins,['eagletmt/neco-ghc', { 'on_ft' : 'haskell'}])
+ 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..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/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
diff --git a/autoload/SpaceVim/layers/shell.vim b/autoload/SpaceVim/layers/shell.vim
new file mode 100644
index 000000000..135fb935e
--- /dev/null
+++ b/autoload/SpaceVim/layers/shell.vim
@@ -0,0 +1,15 @@
+""
+" @section shell, layer-shell
+" @parentsection layers
+" SpaceVim use deol.nvim for shell support in neovim, and use vimshell for
+" vim. for info, read |deol| and |vimshell|.
+
+function! SpaceVim#layers#shell#plugins() abort
+ let plugins = []
+ if has('nvim')
+ call add(plugins,['Shougo/deol.nvim'])
+ else
+ call add(plugins,['Shougo/vimshell.vim', { 'on_cmd':['VimShell']}])
+ endif
+ return plugins
+endfunction
diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim
index 0612a5bb4..3d476ea0f 100644
--- a/autoload/SpaceVim/layers/tools.vim
+++ b/autoload/SpaceVim/layers/tools.vim
@@ -4,7 +4,9 @@ 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}],
- \ ['Yggdroot/LeaderF', {'merged' : 0}],
+ \ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}],
+ \ ['Yggdroot/LeaderF', {'merged' : 0, 'on_cmd' : 'LeaderF'}],
+ \ ['MattesGroeger/vim-bookmarks', { 'on_map' : 'Bookmark', 'loadconf_before' : 1}],
\ ['google/vim-searchindex'],
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
@@ -33,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/leader.vim b/autoload/SpaceVim/mapping/leader.vim
index 0bdfc8f8c..5a0036434 100644
--- a/autoload/SpaceVim/mapping/leader.vim
+++ b/autoload/SpaceVim/mapping/leader.vim
@@ -21,22 +21,36 @@ function! SpaceVim#mapping#leader#defindUniteLeader(key) abort
" The prefix key.
nnoremap [unite]
exe 'nmap ' .a:key . ' [unite]'
- nnoremap [unite]c :UniteWithCurrentDir
- \ -buffer-name=files buffer bookmark file
- nnoremap [unite]b :UniteWithBufferDir
- \ -buffer-name=files -prompt=%\ buffer bookmark file
- nnoremap [unite]r :Unite
- \ -buffer-name=register register
- nnoremap [unite]o :Unite -buffer-name=outline -start-insert -auto-preview -split outline
- nnoremap [unite]s :Unite session
- nnoremap [unite]n :Unite session/new
- nnoremap [unite]fr
+ nnoremap [unite]r
\ :Unite -buffer-name=resume resume
+ if has('nvim')
+ nnoremap [unite]f :Unite file_rec/neovim
+ else
+ nnoremap [unite]f :Unite file_rec/async
+ endif
+ nnoremap [unite]i :Unite file_rec/git
+ nnoremap [unite]g :Unite grep
+ nnoremap [unite]u :Unite source
+ nnoremap [unite]t :Unite tag
+ nnoremap [unite]T :Unite tag/include
+ nnoremap [unite]l :Unite locationlist
+ nnoremap [unite]q :Unite quickfix
+ nnoremap [unite]e :Unite
+ \ -buffer-name=register register
+ nnoremap [unite]j :Unite jump
+ nnoremap [unite]h :Unite history/yank
+ nnoremap [unite]s :Unite session
+ nnoremap [unite]o :Unite -buffer-name=outline -start-insert -auto-preview -split outline
nnoremap [unite]ma
\ :Unite mapping
nnoremap [unite]me
\ :Unite output:message
- nnoremap [unite]f :Unite source
+
+ nnoremap [unite]c :UniteWithCurrentDir
+ \ -buffer-name=files buffer bookmark file
+ nnoremap [unite]b :UniteWithBufferDir
+ \ -buffer-name=files -prompt=%\ buffer bookmark file
+ nnoremap [unite]n :Unite session/new
nnoremap [unite]w
\ :Unite -buffer-name=files -no-split
\ jump_point file_point buffer_tab
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/init.vim b/config/init.vim
index feecd851e..c8f1fe47c 100644
--- a/config/init.vim
+++ b/config/init.vim
@@ -26,7 +26,7 @@ else
silent exec 'language en_US'
else
" in linux-terminal
- silent exec 'language en_US.utf8'
+ silent exec 'lan en_US.utf8'
endif
endif
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/neosnippet.vim b/config/plugins/neosnippet.vim
index fa360ccfe..07cc6fd6c 100644
--- a/config/plugins/neosnippet.vim
+++ b/config/plugins/neosnippet.vim
@@ -1,5 +1,6 @@
-if isdirectory(expand('~/DotFiles/snippets/'))
- let g:neosnippet#snippets_directory = expand('~/DotFiles/snippets/')
+let g:neosnippet#snippets_directory = [expand('~/.SpaceVim.d/snippets/'), expand('~/.SpaceVim/snippets/')]
+if g:spacevim_force_global_config == 0
+ call add(g:neosnippet#snippets_directory, getcwd() . '/.Spacevim.d/snippets')
endif
let g:neosnippet#enable_snipmate_compatibility=1
let g:neosnippet#enable_complete_done = 1
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.vim b/config/plugins/unite.vim
index 215c4342b..a3b164606 100644
--- a/config/plugins/unite.vim
+++ b/config/plugins/unite.vim
@@ -219,6 +219,7 @@ noremap vf :Unite -auto-preview -no-split grep:%::
""" For searching the word in the cursor in all opened buffer
noremap va :Unite -auto-preview -no-split grep:$buffers::
nnoremap bl :Unite -start-insert -buffer-name=buffer buffer
+nnoremap ta :Unite -start-insert -buffer-name=tag tag
"" outline
nnoremap o :Unite -buffer-name=outline -start-insert -auto-preview -no-split outline
"" Line search
@@ -228,7 +229,9 @@ nnoremap y :Unite -no-split -buffer-name=yank history/yank<
" search plugin
" :Unite neobundle/search
"for Unite menu{
-nnoremap ug :Unite -silent -start-insert menu:git
+nnoremap ugg :Unite -silent -start-insert menu:git
+nnoremap ugf :UniteWithCursorWord file_rec/async
+nnoremap ugt :UniteWithCursorWord tag
nnoremap ls :Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos
nnoremap lm :Unite -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer
call zvim#util#loadMusics()
diff --git a/config/plugins/vimfiler.vim b/config/plugins/vimfiler.vim
index d2289edec..476f4566b 100644
--- a/config/plugins/vimfiler.vim
+++ b/config/plugins/vimfiler.vim
@@ -54,6 +54,7 @@ function! s:vimfilerinit()
silent! nunmap
silent! nunmap
silent! nunmap
+ silent! nunmap E
silent! nunmap gr
silent! nunmap gf
silent! nunmap -
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 02b49c298..f82dd67c1 100644
--- a/doc/SpaceVim.txt
+++ b/doc/SpaceVim.txt
@@ -8,13 +8,17 @@ CONTENTS *SpaceVim-contents*
3. Functions............................................|SpaceVim-functions|
4. Layers..................................................|SpaceVim-layers|
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#rust..................................|SpaceVim-layer-lang-rust|
- 8. lang#xml....................................|SpaceVim-layer-lang-xml|
+ 2. checkers....................................|SpaceVim-layer-checkers|
+ 3. colorscheme....................................|SpaceVim-colorscheme|
+ 4. lang#c........................................|SpaceVim-layer-lang-c|
+ 5. lang#elixir..............................|SpaceVim-layer-lang-elixir|
+ 6. lang#go......................................|SpaceVim-layer-lang-go|
+ 7. lang#java..................................|SpaceVim-layer-lang-java|
+ 8. lang#php....................................|SpaceVim-layer-lang-php|
+ 9. lang#python..............................|SpaceVim-layer-lang-python|
+ 10. lang#rust.................................|SpaceVim-layer-lang-rust|
+ 11. lang#xml...................................|SpaceVim-layer-lang-xml|
+ 12. shell.........................................|SpaceVim-layer-shell|
5. FAQ........................................................|SpaceVim-faq|
==============================================================================
@@ -214,6 +218,14 @@ To disable lint on save:
let g:spacevim_lint_on_save = 0
<
+ *g:spacevim_enable_vimfiler_welcome*
+Enable/Disable Vimfiler in the welcome windows, this will cause vim slow on
+startup if there are too many files in current directory. you can disable it
+by:
+>
+ let g:spacevim_enable_vimfiler_welcome = 0
+<
+
*g:spacevim_hosts_url*
The host file url. this option is for chinese users who can not use google and
twitter.
@@ -258,6 +270,14 @@ 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|.
+neosnippet support custtom snippets, and the default snippets directory is
+`~/.SpaceVim.d/snippets/` and if g:spacevim_force_global_config = 1, SpaceVim
+will not append `./.SpaceVim.d/snippets` as default snippets directory.
+
+==============================================================================
+CHECKERS *SpaceVim-layer-checkers*
+
+SpaceVim use neomake as default syntax checker.
==============================================================================
COLORSCHEME *SpaceVim-colorscheme*
@@ -427,6 +447,15 @@ get completions within conditional preprocessor blocks. The default is 50,
setting it to 0 disables this feature.
+==============================================================================
+LANG#ELIXIR *SpaceVim-layer-lang-elixir*
+
+INTRO
+lang#elixir layer provide code completion,documentation lookup, jump to
+definition, mix integration and iex integration for elixir project. SpaceVim
+use neomake as default syntax checker which is loaded in
+|SpaceVim-layer-checkers|
+
==============================================================================
LANG#GO *SpaceVim-layer-lang-go*
@@ -497,6 +526,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*
@@ -531,6 +570,12 @@ 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.
+==============================================================================
+SHELL *SpaceVim-layer-shell*
+
+SpaceVim use deol.nvim for shell support in neovim, and use vimshell for vim.
+for info, read |deol| and |vimshell|.
+
==============================================================================
FAQ *SpaceVim-faq*
diff --git a/filetype.vim b/filetype.vim
new file mode 100644
index 000000000..e69de29bb
diff --git a/logo.png b/logo.png
new file mode 100644
index 000000000..47c510aa8
Binary files /dev/null and b/logo.png differ