mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-15 08:09:11 +08:00
Merge branch 'dev'
This commit is contained in:
commit
80bfa0eabc
14
.github/ISSUE_TEMPLATE.md
vendored
14
.github/ISSUE_TEMPLATE.md
vendored
@ -1,19 +1,15 @@
|
|||||||
### Expected behavior, english is recommend
|
## Expected behavior, english is recommend
|
||||||
|
|
||||||
|
|
||||||
### Environment Information
|
## Environment Information
|
||||||
- OS:
|
- OS:
|
||||||
- vim version:
|
- vim version:
|
||||||
- neovim 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 below, if you want me reproduce your issue quickly, post your custom config here will be better.
|
||||||
please post log here:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
|
169
README.md
169
README.md
@ -1,47 +1,49 @@
|
|||||||
<p align="center"><img src="https://github.com/SpaceVim/SpaceVim/raw/table/logo.jpg" alt="SpaceVim"/></p>
|
<p align="center"><img src="https://raw.githubusercontent.com/SpaceVim/SpaceVim/dev/logo.png" alt="SpaceVim"/></p>
|
||||||
|
|
||||||
[](https://travis-ci.org/SpaceVim/SpaceVim)
|
[](https://travis-ci.org/SpaceVim/SpaceVim)
|
||||||

|

|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](doc/SpaceVim.txt)
|
[](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
|
### Table of Contents
|
||||||
- [Introduction](#introduction)
|
- [Introduction](#introduction)
|
||||||
|
- [Community](#community)
|
||||||
- [Install](#install)
|
- [Install](#install)
|
||||||
- [Linux/Mac](#linuxmac)
|
- [Linux/Mac](#linuxmac)
|
||||||
- [Windows support](#windows-support)
|
- [Windows support](#windows-support)
|
||||||
- [File Structure](#file-structure)
|
- [File Structure](#file-structure)
|
||||||
- Features
|
- 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)
|
- [Awesome ui](#awesome-ui)
|
||||||
- [Language specific mode](#language-specific-mode)
|
- [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
|
- Extensive Neocomplete setup
|
||||||
- Central location for tags
|
- Central location for tags
|
||||||
- Lightweight simple status/tabline
|
- Lightweight simple status/tabline
|
||||||
- Premium color-schemes
|
- Premium color-schemes
|
||||||
- Custom configuration
|
- [Custom configuration](#custom-configuration)
|
||||||
- Support SpaceVim
|
- [Support SpaceVim](#support-spacevim)
|
||||||
- contribute to SpaceVim
|
- [Report bugs](#report-bugs)
|
||||||
|
- [contribute to SpaceVim](#contribute-to-spacevim)
|
||||||
- Write post about SpaceVim
|
- Write post about SpaceVim
|
||||||
- Report bugs
|
- [Credits & Thanks](#credits--thanks)
|
||||||
|
|
||||||
#### Introduction
|
#### Introduction
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim,
|
[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
|
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,
|
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)
|
[](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
|
#### Install
|
||||||
|
|
||||||
##### Linux/Mac
|
##### Linux/Mac
|
||||||
@ -114,6 +128,32 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
|
|||||||
|
|
||||||
#### Features
|
#### 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.
|
##### Neovim centric - Dark powered mode of SpaceVim.
|
||||||
|
|
||||||
By default, SpaceVim use these dark powered plugins:
|
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 work flow leader can only be used in normal mode. Unite leader need unite groups.
|
||||||
|
|
||||||
#### Unite centric work-flow
|
#### Unite centric work-flow
|
||||||
- List all the plugins has been installed, fuzzy find what you want,
|
- 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`
|
||||||
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 mappings and description: `f<space>`
|
- 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`
|
- 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
|
#### Plugin Highlights
|
||||||
|
|
||||||
@ -350,7 +372,10 @@ Name | Description
|
|||||||
|
|
||||||
Key | Mode | Action
|
Key | Mode | Action
|
||||||
----- |:----:| ------------------
|
----- |:----:| ------------------
|
||||||
`<leader>`+`y` | Normal/visual | Copy selection to X11 clipboard ("+y)
|
`<leader>`+`y` | visual | Copy selection to X11 clipboard ("+y)
|
||||||
|
`Ctrl`+`c` | Normal | Copy full path of current buffer to X11 clipboard
|
||||||
|
`<leader>`+`Ctrl`+`c` | Normal | Copy github.com url of current buffer to X11 clipboard(if it is a github repo)
|
||||||
|
`<leader>`+`Ctrl`+`l` | Normal/visual | Copy github.com url of current lines to X11 clipboard(if it is a github repo)
|
||||||
`<leader>`+`p` | Normal/visual | Paste selection from X11 clipboard ("+p)
|
`<leader>`+`p` | Normal/visual | Paste selection from X11 clipboard ("+p)
|
||||||
`Ctrl`+`f` | Normal | Smart page forward (C-f/C-d)
|
`Ctrl`+`f` | Normal | Smart page forward (C-f/C-d)
|
||||||
`Ctrl`+`b` | Normal | Smart page backwards (C-b/C-u)
|
`Ctrl`+`b` | Normal | Smart page backwards (C-b/C-u)
|
||||||
@ -374,10 +399,10 @@ Key | Mode | Action
|
|||||||
|
|
||||||
Key | Mode | Action
|
Key | Mode | Action
|
||||||
----- |:----:| ------------------
|
----- |:----:| ------------------
|
||||||
`<leader>`+`cd` | Normal | Switch to the root directory(vim-rooter)
|
`<leader>`+`cd` | Normal | Switch to the directory of the open buffer
|
||||||
`<leader>`+`w` | Normal/visual | Write (:w)
|
`<leader>`+`w` | Normal/visual | Write (:w)
|
||||||
`Ctrl`+`s` | _All_ | Write (:w)
|
`Ctrl`+`s` | Normal/visual/Command | Write (:w)
|
||||||
`W!!` | Command | Write as root
|
`:w!!` | Command | Write as root (%!sudo tee > /dev/null %)
|
||||||
|
|
||||||
##### Editor UI
|
##### Editor UI
|
||||||
|
|
||||||
@ -427,27 +452,31 @@ Key | Mode | Action
|
|||||||
|
|
||||||
Key | Mode | Action
|
Key | Mode | Action
|
||||||
----- |:----:| ------------------
|
----- |:----:| ------------------
|
||||||
`;`+`r` | Normal | Resumes Unite window
|
`[unite]` | Normal | unite leader, default is `f`, `:h g:spacevim_unite_leader`
|
||||||
`;`+`f` | Normal | Opens Unite file recursive search
|
`[unite]`+`r` | Normal | Resumes Unite window
|
||||||
`;`+`i` | Normal | Opens Unite git file search
|
`[unite]`+`f` | Normal | Opens Unite file recursive search
|
||||||
`;`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher)
|
`[unite]`+`i` | Normal | Opens Unite git file search
|
||||||
`;`+`u` | Normal | Opens Unite source
|
`[unite]`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher)
|
||||||
`;`+`t` | Normal | Opens Unite tag
|
`[unite]`+`u` | Normal | Opens Unite source
|
||||||
`;`+`T` | Normal | Opens Unite tag/include
|
`[unite]`+`t` | Normal | Opens Unite tag
|
||||||
`;`+`l` | Normal | Opens Unite location list
|
`[unite]`+`T` | Normal | Opens Unite tag/include
|
||||||
`;`+`q` | Normal | Opens Unite quick fix
|
`[unite]`+`l` | Normal | Opens Unite location list
|
||||||
`;`+`e` | Normal | Opens Unite register
|
`[unite]`+`q` | Normal | Opens Unite quick fix
|
||||||
`;`+`j` | Normal | Opens Unite jump, change
|
`[unite]`+`e` | Normal | Opens Unite register
|
||||||
`;`+`h` | Normal | Opens Unite history/yank
|
`[unite]`+`j` | Normal | Opens Unite jump, change
|
||||||
`;`+`s` | Normal | Opens Unite session
|
`[unite]`+`h` | Normal | Opens Unite history/yank
|
||||||
`;`+`o` | Normal | Opens Unite outline
|
`[unite]`+`s` | Normal | Opens Unite session
|
||||||
`;`+`ma` | Normal | Opens Unite mapping
|
`[unite]`+`n` | Normal | Opens Unite session/new
|
||||||
`;`+`me` | Normal | Opens Unite output messages
|
`[unite]`+`o` | Normal | Opens Unite outline
|
||||||
`<leader>`+`b` | Normal | Opens Unite buffers, mru, bookmark
|
`[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]`+`<space>` | Normal | Opens Unite menu:CustomKeyMaps
|
||||||
|
`[unite]`+`me` | Normal | Opens Unite output messages
|
||||||
|
`<leader>`+`bl` | Normal | Opens Unite buffers, mru, bookmark
|
||||||
`<leader>`+`ta` | Normal | Opens Unite tab
|
`<leader>`+`ta` | Normal | Opens Unite tab
|
||||||
`<leader>`+`gf` | Normal | Opens Unite file with word at cursor
|
`<leader>`+`ugf` | Normal | Opens Unite file with word at cursor
|
||||||
`<leader>`+`gt` | Normal/visual | Opens Unite tag with word at cursor
|
`<leader>`+`ugt` | Normal/visual | Opens Unite tag with word at cursor
|
||||||
`<leader>`+`gg` | Visual | Opens Unite navigate with word at cursor
|
|
||||||
| **Within _Unite_ buffers** |||
|
| **Within _Unite_ buffers** |||
|
||||||
`Ctrl`+`h/k/l/r` | Normal | Un-map
|
`Ctrl`+`h/k/l/r` | Normal | Un-map
|
||||||
`Ctrl`+`r` | Normal | Redraw
|
`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.
|
in the root of your project. `.SpaceVim.d/` will also be added into runtimepath.
|
||||||
|
|
||||||
here is an example config file for SpaceVim:
|
here is an example config file for SpaceVim:
|
||||||
|
|
||||||
```viml
|
```viml
|
||||||
" set the options of SpaceVim
|
" set the options of SpaceVim
|
||||||
let g:spacevim_colorscheme = 'solarized'
|
let g:spacevim_colorscheme = 'solarized'
|
||||||
@ -592,9 +622,16 @@ let g:spacevim_custom_plugins = [
|
|||||||
nnoremap <c-l> :Ydc<cr>
|
nnoremap <c-l> :Ydc<cr>
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 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
|
#### Credits & Thanks
|
||||||
|
- [](https://github.com/SpaceVim/SpaceVim/graphs/contributors)
|
||||||
- [vimdoc](https://github.com/google/vimdoc) generate doc file for SpaceVim
|
- [vimdoc](https://github.com/google/vimdoc) generate doc file for SpaceVim
|
||||||
- [Rafael Bodill](https://github.com/rafi) and his vim-config
|
- [Rafael Bodill](https://github.com/rafi) and his vim-config
|
||||||
- [Bailey Ling](https://github.com/bling) and his dotvim
|
- [Bailey Ling](https://github.com/bling) and his dotvim
|
||||||
|
@ -210,6 +210,13 @@ let g:spacevim_enable_powerline_fonts = 1
|
|||||||
" let g:spacevim_lint_on_save = 0
|
" let g:spacevim_lint_on_save = 0
|
||||||
" <
|
" <
|
||||||
let g:spacevim_lint_on_save = 1
|
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_smartcloseignorewin = ['__Tagbar__' , 'vimfiler:default']
|
||||||
let g:spacevim_smartcloseignoreft = ['help']
|
let g:spacevim_smartcloseignoreft = ['help']
|
||||||
let g:spacevim_altmoveignoreft = ['Tagbar' , 'vimfiler']
|
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'
|
let help = fnamemodify(g:Config_Main_Home, ':p:h:h') . '/doc'
|
||||||
exe 'helptags ' . help
|
exe 'helptags ' . help
|
||||||
|
|
||||||
|
""
|
||||||
|
" set language
|
||||||
|
if !empty(g:spacevim_language)
|
||||||
|
silent exec 'lan ' . g:spacevim_language
|
||||||
|
endif
|
||||||
|
|
||||||
call SpaceVim#plugins#load()
|
call SpaceVim#plugins#load()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -313,9 +326,13 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! SpaceVim#welcome() abort
|
function! SpaceVim#welcome() abort
|
||||||
VimFiler
|
if exists(':VimFiler') == 2 && exists(':Startify') == 2
|
||||||
wincmd p
|
if g:spacevim_enable_vimfiler_welcome
|
||||||
Startify
|
VimFiler
|
||||||
|
endif
|
||||||
|
wincmd p
|
||||||
|
Startify
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -27,6 +27,9 @@ function! SpaceVim#default#SetOptions() abort
|
|||||||
set relativenumber
|
set relativenumber
|
||||||
set number
|
set number
|
||||||
|
|
||||||
|
" hide cmd
|
||||||
|
set noshowcmd
|
||||||
|
|
||||||
" indent
|
" indent
|
||||||
set autoindent
|
set autoindent
|
||||||
set smartindent
|
set smartindent
|
||||||
@ -78,7 +81,6 @@ function! SpaceVim#default#SetOptions() abort
|
|||||||
set nowritebackup
|
set nowritebackup
|
||||||
set matchtime=0
|
set matchtime=0
|
||||||
set ruler
|
set ruler
|
||||||
set showcmd
|
|
||||||
set showmatch
|
set showmatch
|
||||||
set showmode
|
set showmode
|
||||||
"menuone: show the pupmenu when only one match
|
"menuone: show the pupmenu when only one match
|
||||||
@ -274,8 +276,8 @@ function! SpaceVim#default#SetMappings() abort
|
|||||||
cnoremap <C-b> <Left>
|
cnoremap <C-b> <Left>
|
||||||
cnoremap <C-f> <Right>
|
cnoremap <C-f> <Right>
|
||||||
|
|
||||||
" When pressing <leader>cd switch to the directory of the open buffer
|
"When pressing <leader>cd switch to the directory of the open buffer
|
||||||
" map <Leader>cd :cd %:p:h<CR>:pwd<CR> "I use <Plug>RooterChangeToRootDirectory
|
map <Leader>cd :cd %:p:h<CR>:pwd<CR>
|
||||||
|
|
||||||
" Fast saving
|
" Fast saving
|
||||||
nnoremap <Leader>w :w<CR>
|
nnoremap <Leader>w :w<CR>
|
||||||
|
18
autoload/SpaceVim/health.vim
Normal file
18
autoload/SpaceVim/health.vim
Normal file
@ -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
|
24
autoload/SpaceVim/health/clipboard.vim
Normal file
24
autoload/SpaceVim/health/clipboard.vim
Normal file
@ -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
|
18
autoload/SpaceVim/health/lua.vim
Normal file
18
autoload/SpaceVim/health/lua.vim
Normal file
@ -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
|
41
autoload/SpaceVim/health/python.vim
Normal file
41
autoload/SpaceVim/health/python.vim
Normal file
@ -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
|
@ -13,7 +13,10 @@
|
|||||||
" @subsection snippet
|
" @subsection snippet
|
||||||
" SpaceVim use neosnippet as default snippet engine, and the default snippets
|
" SpaceVim use neosnippet as default snippet engine, and the default snippets
|
||||||
" is `Shougo/neosnippet-snippets`. for more information, please read
|
" 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
|
endif
|
||||||
return plugins
|
return plugins
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function SpaceVim#layers#autocomplete#config()
|
||||||
|
if g:spacevim_autocomplete_method ==# 'ycm'
|
||||||
|
iunmap <S-TAB>
|
||||||
|
sunmap <S-TAB>
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
""
|
||||||
|
" @section checkers, layer-checkers
|
||||||
|
" @parentsection layers
|
||||||
|
" SpaceVim use neomake as default syntax checker.
|
||||||
|
|
||||||
function! SpaceVim#layers#checkers#plugins() abort
|
function! SpaceVim#layers#checkers#plugins() abort
|
||||||
let plugins = []
|
let plugins = []
|
||||||
|
|
||||||
|
@ -160,5 +160,6 @@ function! SpaceVim#layers#colorscheme#plugins() abort
|
|||||||
\ ['gregsexton/Atom'],
|
\ ['gregsexton/Atom'],
|
||||||
\ ['gilgigilgil/anderson.vim'],
|
\ ['gilgigilgil/anderson.vim'],
|
||||||
\ ['romainl/Apprentice'],
|
\ ['romainl/Apprentice'],
|
||||||
|
\ ['icymind/NeoSolarized'],
|
||||||
\ ]
|
\ ]
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
function! SpaceVim#layers#edit#plugins() abort
|
function! SpaceVim#layers#edit#plugins() abort
|
||||||
let plugins = [
|
let plugins = [
|
||||||
\ ['tpope/vim-surround'],
|
\ ['tpope/vim-surround'],
|
||||||
|
\ ['junegunn/vim-emoji'],
|
||||||
\ ['terryma/vim-multiple-cursors'],
|
\ ['terryma/vim-multiple-cursors'],
|
||||||
\ ['scrooloose/nerdcommenter'],
|
\ ['scrooloose/nerdcommenter'],
|
||||||
\ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}],
|
\ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}],
|
||||||
|
@ -24,12 +24,6 @@ function! SpaceVim#layers#lang#plugins() abort
|
|||||||
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
|
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
|
||||||
\ ['voxpupuli/vim-puppet', {'on_ft' : 'puppet'}],
|
\ ['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
|
return plugins
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
14
autoload/SpaceVim/layers/lang/elixir.vim
Normal file
14
autoload/SpaceVim/layers/lang/elixir.vim
Normal file
@ -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
|
7
autoload/SpaceVim/layers/lang/haskell.vim
Normal file
7
autoload/SpaceVim/layers/lang/haskell.vim
Normal file
@ -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
|
19
autoload/SpaceVim/layers/lang/python.vim
Normal file
19
autoload/SpaceVim/layers/lang/python.vim
Normal file
@ -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
|
@ -10,7 +10,6 @@ function! SpaceVim#layers#lang#xml#plugins() abort
|
|||||||
let plugins = []
|
let plugins = []
|
||||||
call add(plugins,['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}])
|
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,['sukima/xmledit', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}])
|
||||||
call add(plugins,['alvan/vim-closetag', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}])
|
|
||||||
return plugins
|
return plugins
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
15
autoload/SpaceVim/layers/shell.vim
Normal file
15
autoload/SpaceVim/layers/shell.vim
Normal file
@ -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
|
@ -4,7 +4,9 @@ function! SpaceVim#layers#tools#plugins() abort
|
|||||||
\ ['wsdjeg/vim-cheat', { 'on_cmd' : 'Cheat'}],
|
\ ['wsdjeg/vim-cheat', { 'on_cmd' : 'Cheat'}],
|
||||||
\ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}],
|
\ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}],
|
||||||
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}],
|
\ ['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' : '<Plug>Bookmark', 'loadconf_before' : 1}],
|
||||||
\ ['google/vim-searchindex'],
|
\ ['google/vim-searchindex'],
|
||||||
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
||||||
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
|
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
|
||||||
@ -33,6 +35,11 @@ function! SpaceVim#layers#tools#plugins() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#layers#tools#config() abort
|
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>
|
nnoremap <silent> <F7> :MundoToggle<CR>
|
||||||
augroup rainbow_lisp
|
augroup rainbow_lisp
|
||||||
autocmd!
|
autocmd!
|
||||||
|
@ -4,6 +4,7 @@ function! SpaceVim#layers#ui#plugins() abort
|
|||||||
\ ['Yggdroot/indentLine'],
|
\ ['Yggdroot/indentLine'],
|
||||||
\ ['mhinz/vim-signify'],
|
\ ['mhinz/vim-signify'],
|
||||||
\ ['majutsushi/tagbar', {'loadconf' : 1}],
|
\ ['majutsushi/tagbar', {'loadconf' : 1}],
|
||||||
|
\ ['lvht/tagbar-markdown',{'merged' : 0}],
|
||||||
\ ['vim-airline/vim-airline', { 'merged' : 0, 'loadconf' : 1}],
|
\ ['vim-airline/vim-airline', { 'merged' : 0, 'loadconf' : 1}],
|
||||||
\ ['vim-airline/vim-airline-themes', { 'merged' : 0}],
|
\ ['vim-airline/vim-airline-themes', { 'merged' : 0}],
|
||||||
\ ['mhinz/vim-startify', {'loadconf' : 1}],
|
\ ['mhinz/vim-startify', {'loadconf' : 1}],
|
||||||
|
@ -21,6 +21,7 @@ function! SpaceVim#layers#unite#plugins() abort
|
|||||||
\ ['heavenshell/unite-zf'],
|
\ ['heavenshell/unite-zf'],
|
||||||
\ ['heavenshell/unite-sf2'],
|
\ ['heavenshell/unite-sf2'],
|
||||||
\ ['osyo-manga/unite-vimpatches'],
|
\ ['osyo-manga/unite-vimpatches'],
|
||||||
|
\ ['rhysd/unite-emoji.vim'],
|
||||||
\ ['Shougo/unite-outline'],
|
\ ['Shougo/unite-outline'],
|
||||||
\ ['hewes/unite-gtags' ,{'loadconf' : 1}],
|
\ ['hewes/unite-gtags' ,{'loadconf' : 1}],
|
||||||
\ ['rafi/vim-unite-issue'],
|
\ ['rafi/vim-unite-issue'],
|
||||||
|
@ -47,19 +47,29 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! SpaceVim#logger#viewLog(...) abort
|
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 .= 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
|
let l = a:0 > 0 ? a:1 : 1
|
||||||
if filereadable(s:logger_file)
|
if filereadable(s:logger_file)
|
||||||
let logs = readfile(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
|
else
|
||||||
let info .= '[ SpaceVim ] : logger file ' . s:logger_file . ' does not exists, only log for current process will be shown!'
|
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")
|
let info .= join(filter(s:log_temp, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n")
|
||||||
return info
|
|
||||||
endif
|
endif
|
||||||
|
let info .= "\n```\n"
|
||||||
|
return info
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -21,22 +21,36 @@ function! SpaceVim#mapping#leader#defindUniteLeader(key) abort
|
|||||||
" The prefix key.
|
" The prefix key.
|
||||||
nnoremap [unite] <Nop>
|
nnoremap [unite] <Nop>
|
||||||
exe 'nmap ' .a:key . ' [unite]'
|
exe 'nmap ' .a:key . ' [unite]'
|
||||||
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir
|
nnoremap <silent> [unite]r
|
||||||
\ -buffer-name=files buffer bookmark file<CR>
|
|
||||||
nnoremap <silent> [unite]b :<C-u>UniteWithBufferDir
|
|
||||||
\ -buffer-name=files -prompt=%\ buffer bookmark file<CR>
|
|
||||||
nnoremap <silent> [unite]r :<C-u>Unite
|
|
||||||
\ -buffer-name=register register<CR>
|
|
||||||
nnoremap <silent> [unite]o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -split outline<CR>
|
|
||||||
nnoremap <silent> [unite]s :<C-u>Unite session<CR>
|
|
||||||
nnoremap <silent> [unite]n :<C-u>Unite session/new<CR>
|
|
||||||
nnoremap <silent> [unite]fr
|
|
||||||
\ :<C-u>Unite -buffer-name=resume resume<CR>
|
\ :<C-u>Unite -buffer-name=resume resume<CR>
|
||||||
|
if has('nvim')
|
||||||
|
nnoremap <silent> [unite]f :<C-u>Unite file_rec/neovim<cr>
|
||||||
|
else
|
||||||
|
nnoremap <silent> [unite]f :<C-u>Unite file_rec/async<cr>
|
||||||
|
endif
|
||||||
|
nnoremap <silent> [unite]i :<C-u>Unite file_rec/git<cr>
|
||||||
|
nnoremap <silent> [unite]g :<C-u>Unite grep<cr>
|
||||||
|
nnoremap <silent> [unite]u :<C-u>Unite source<CR>
|
||||||
|
nnoremap <silent> [unite]t :<C-u>Unite tag<CR>
|
||||||
|
nnoremap <silent> [unite]T :<C-u>Unite tag/include<CR>
|
||||||
|
nnoremap <silent> [unite]l :<C-u>Unite locationlist<CR>
|
||||||
|
nnoremap <silent> [unite]q :<C-u>Unite quickfix<CR>
|
||||||
|
nnoremap <silent> [unite]e :<C-u>Unite
|
||||||
|
\ -buffer-name=register register<CR>
|
||||||
|
nnoremap <silent> [unite]j :<C-u>Unite jump<CR>
|
||||||
|
nnoremap <silent> [unite]h :<C-u>Unite history/yank<CR>
|
||||||
|
nnoremap <silent> [unite]s :<C-u>Unite session<CR>
|
||||||
|
nnoremap <silent> [unite]o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -split outline<CR>
|
||||||
nnoremap <silent> [unite]ma
|
nnoremap <silent> [unite]ma
|
||||||
\ :<C-u>Unite mapping<CR>
|
\ :<C-u>Unite mapping<CR>
|
||||||
nnoremap <silent> [unite]me
|
nnoremap <silent> [unite]me
|
||||||
\ :<C-u>Unite output:message<CR>
|
\ :<C-u>Unite output:message<CR>
|
||||||
nnoremap [unite]f :<C-u>Unite source<CR>
|
|
||||||
|
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir
|
||||||
|
\ -buffer-name=files buffer bookmark file<CR>
|
||||||
|
nnoremap <silent> [unite]b :<C-u>UniteWithBufferDir
|
||||||
|
\ -buffer-name=files -prompt=%\ buffer bookmark file<CR>
|
||||||
|
nnoremap <silent> [unite]n :<C-u>Unite session/new<CR>
|
||||||
nnoremap <silent> [unite]w
|
nnoremap <silent> [unite]w
|
||||||
\ :<C-u>Unite -buffer-name=files -no-split
|
\ :<C-u>Unite -buffer-name=files -no-split
|
||||||
\ jump_point file_point buffer_tab
|
\ jump_point file_point buffer_tab
|
||||||
|
@ -11,7 +11,6 @@ function! SpaceVim#plugins#load() abort
|
|||||||
endfunction
|
endfunction
|
||||||
function! s:load_plugins() abort
|
function! s:load_plugins() abort
|
||||||
for group in g:spacevim_plugin_groups
|
for group in g:spacevim_plugin_groups
|
||||||
let g:spacevim_plugin_layer = group
|
|
||||||
for plugin in s:getLayerPlugins(group)
|
for plugin in s:getLayerPlugins(group)
|
||||||
if len(plugin) == 2
|
if len(plugin) == 2
|
||||||
call zvim#plug#add(plugin[0], plugin[1])
|
call zvim#plug#add(plugin[0], plugin[1])
|
||||||
@ -27,9 +26,6 @@ function! s:load_plugins() abort
|
|||||||
endfor
|
endfor
|
||||||
call s:loadLayerConfig(group)
|
call s:loadLayerConfig(group)
|
||||||
endfor
|
endfor
|
||||||
if exists('g:spacevim_plugin_layer')
|
|
||||||
unlet g:spacevim_plugin_layer
|
|
||||||
endif
|
|
||||||
for plugin in g:spacevim_custom_plugins
|
for plugin in g:spacevim_custom_plugins
|
||||||
if len(plugin) == 2
|
if len(plugin) == 2
|
||||||
call zvim#plug#add(plugin[0], plugin[1])
|
call zvim#plug#add(plugin[0], plugin[1])
|
||||||
|
@ -150,20 +150,24 @@ fu! s:parser(args)
|
|||||||
endf
|
endf
|
||||||
|
|
||||||
function! zvim#plug#add(repo,...) abort
|
function! zvim#plug#add(repo,...) abort
|
||||||
|
let g:spacevim_plugin_name = ''
|
||||||
if g:spacevim_plugin_manager == 'neobundle'
|
if g:spacevim_plugin_manager == 'neobundle'
|
||||||
exec 'NeoBundle "'.a:repo.'"'.','.join(a:000,',')
|
exec 'NeoBundle "'.a:repo.'"'.','.join(a:000,',')
|
||||||
|
let g:spacevim_plugin_name = split(a:repo, '/')[-1]
|
||||||
elseif g:spacevim_plugin_manager == 'dein'
|
elseif g:spacevim_plugin_manager == 'dein'
|
||||||
if len(a:000) > 0
|
if len(a:000) > 0
|
||||||
call dein#add(a:repo,s:parser(a:000[0]))
|
call dein#add(a:repo,s:parser(a:000[0]))
|
||||||
else
|
else
|
||||||
call dein#add(a:repo)
|
call dein#add(a:repo)
|
||||||
endif
|
endif
|
||||||
|
let g:spacevim_plugin_name = g:dein#name
|
||||||
elseif g:spacevim_plugin_manager == 'vim-plug'
|
elseif g:spacevim_plugin_manager == 'vim-plug'
|
||||||
if len(a:000) > 0
|
if len(a:000) > 0
|
||||||
exec "Plug '".a:repo."', ".join(a:000,',')
|
exec "Plug '".a:repo."', ".join(a:000,',')
|
||||||
else
|
else
|
||||||
exec "Plug '".a:repo."'"
|
exec "Plug '".a:repo."'"
|
||||||
endif
|
endif
|
||||||
|
let g:spacevim_plugin_name = split(a:repo, '/')[-1]
|
||||||
endif
|
endif
|
||||||
let str = get(g:,'spacevim_plugin_layer', 'custom plugin')
|
let str = get(g:,'spacevim_plugin_layer', 'custom plugin')
|
||||||
let str = '[' . str . ']'
|
let str = '[' . str . ']'
|
||||||
|
@ -26,7 +26,7 @@ else
|
|||||||
silent exec 'language en_US'
|
silent exec 'language en_US'
|
||||||
else
|
else
|
||||||
" in linux-terminal
|
" in linux-terminal
|
||||||
silent exec 'language en_US.utf8'
|
silent exec 'lan en_US.utf8'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ let g:deoplete#ignore_sources.c = ['omni']
|
|||||||
let g:deoplete#ignore_sources.rust = ['omni']
|
let g:deoplete#ignore_sources.rust = ['omni']
|
||||||
let g:deoplete#ignore_sources.perl = ['omni']
|
let g:deoplete#ignore_sources.perl = ['omni']
|
||||||
call deoplete#custom#set('go', 'mark', '')
|
call deoplete#custom#set('go', 'mark', '')
|
||||||
|
call deoplete#custom#set('go', 'rank', 9999)
|
||||||
call deoplete#custom#set('clang2', 'mark', '')
|
call deoplete#custom#set('clang2', 'mark', '')
|
||||||
call deoplete#custom#set('racer', 'mark', '')
|
call deoplete#custom#set('racer', 'mark', '')
|
||||||
if g:spacevim_enable_javacomplete2_py
|
if g:spacevim_enable_javacomplete2_py
|
||||||
|
@ -1,18 +1,26 @@
|
|||||||
|
let s:save_option = {}
|
||||||
function! s:goyo_enter()
|
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 noshowmode
|
||||||
set noshowcmd
|
set noshowcmd
|
||||||
set scrolloff=999
|
set scrolloff=999
|
||||||
Limelight
|
if exists(':Limelight') == 2
|
||||||
|
Limelight
|
||||||
|
let s:save_option['limelight'] = 1
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:goyo_leave()
|
function! s:goyo_leave()
|
||||||
silent !tmux set status on
|
let &showmode = s:save_option['showmode']
|
||||||
set showmode
|
let &showcmd = s:save_option['showcmd']
|
||||||
set showcmd
|
let &scrolloff = s:save_option['scrolloff']
|
||||||
set scrolloff=5
|
if get(s:save_option,'limelight', 0)
|
||||||
|
execute 'Limelight!'
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
augroup goyo_map
|
augroup goyo_map
|
||||||
autocmd! User GoyoEnter nested call <SID>goyo_enter()
|
autocmd! User GoyoEnter nested call <SID>goyo_enter()
|
||||||
autocmd! User GoyoLeave nested call <SID>goyo_leave()
|
autocmd! User GoyoLeave nested call <SID>goyo_leave()
|
||||||
augroup END
|
augroup END
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
if isdirectory(expand('~/DotFiles/snippets/'))
|
let g:neosnippet#snippets_directory = [expand('~/.SpaceVim.d/snippets/'), expand('~/.SpaceVim/snippets/')]
|
||||||
let g:neosnippet#snippets_directory = expand('~/DotFiles/snippets/')
|
if g:spacevim_force_global_config == 0
|
||||||
|
call add(g:neosnippet#snippets_directory, getcwd() . '/.Spacevim.d/snippets')
|
||||||
endif
|
endif
|
||||||
let g:neosnippet#enable_snipmate_compatibility=1
|
let g:neosnippet#enable_snipmate_compatibility=1
|
||||||
let g:neosnippet#enable_complete_done = 1
|
let g:neosnippet#enable_complete_done = 1
|
||||||
|
@ -1,2 +1,12 @@
|
|||||||
let g:tagbar_width=30
|
let g:tagbar_width=30
|
||||||
let g:tagbar_left = 1
|
let g:tagbar_left = 1
|
||||||
|
|
||||||
|
|
||||||
|
let g:tagbar_type_markdown = {
|
||||||
|
\ 'ctagstype' : 'markdown',
|
||||||
|
\ 'kinds' : [
|
||||||
|
\ 'h:headings',
|
||||||
|
\ ],
|
||||||
|
\ 'sort' : 0
|
||||||
|
\ }
|
||||||
|
|
||||||
|
@ -219,6 +219,7 @@ noremap <silent><leader>vf :Unite -auto-preview -no-split grep:%::<C-r><C-w><CR>
|
|||||||
""" For searching the word in the cursor in all opened buffer
|
""" For searching the word in the cursor in all opened buffer
|
||||||
noremap <silent><leader>va :Unite -auto-preview -no-split grep:$buffers::<C-r><C-w><CR>
|
noremap <silent><leader>va :Unite -auto-preview -no-split grep:$buffers::<C-r><C-w><CR>
|
||||||
nnoremap <silent><Leader>bl :<C-u>Unite -start-insert -buffer-name=buffer buffer<cr>
|
nnoremap <silent><Leader>bl :<C-u>Unite -start-insert -buffer-name=buffer buffer<cr>
|
||||||
|
nnoremap <silent><Leader>ta :<C-u>Unite -start-insert -buffer-name=tag tag<cr>
|
||||||
"" outline
|
"" outline
|
||||||
nnoremap <silent><leader>o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -no-split outline<cr>
|
nnoremap <silent><leader>o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -no-split outline<cr>
|
||||||
"" Line search
|
"" Line search
|
||||||
@ -228,7 +229,9 @@ nnoremap <silent><leader>y :<C-u>Unite -no-split -buffer-name=yank history/yank<
|
|||||||
" search plugin
|
" search plugin
|
||||||
" :Unite neobundle/search
|
" :Unite neobundle/search
|
||||||
"for Unite menu{
|
"for Unite menu{
|
||||||
nnoremap <silent><leader>ug :Unite -silent -start-insert menu:git<CR>
|
nnoremap <silent><leader>ugg :Unite -silent -start-insert menu:git<CR>
|
||||||
|
nnoremap <silent><leader>ugf :UniteWithCursorWord file_rec/async<CR>
|
||||||
|
nnoremap <silent><leader>ugt :UniteWithCursorWord tag<CR>
|
||||||
nnoremap <silent><Leader>ls :Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos<CR>
|
nnoremap <silent><Leader>ls :Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos<CR>
|
||||||
nnoremap <silent><Leader>lm :Unite -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer<CR>
|
nnoremap <silent><Leader>lm :Unite -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer<CR>
|
||||||
call zvim#util#loadMusics()
|
call zvim#util#loadMusics()
|
||||||
|
@ -54,6 +54,7 @@ function! s:vimfilerinit()
|
|||||||
silent! nunmap <buffer> <Space>
|
silent! nunmap <buffer> <Space>
|
||||||
silent! nunmap <buffer> <C-l>
|
silent! nunmap <buffer> <C-l>
|
||||||
silent! nunmap <buffer> <C-j>
|
silent! nunmap <buffer> <C-j>
|
||||||
|
silent! nunmap <buffer> E
|
||||||
silent! nunmap <buffer> gr
|
silent! nunmap <buffer> gr
|
||||||
silent! nunmap <buffer> gf
|
silent! nunmap <buffer> gf
|
||||||
silent! nunmap <buffer> -
|
silent! nunmap <buffer> -
|
||||||
|
9
config/plugins_before/vim-bookmarks.vim
Normal file
9
config/plugins_before/vim-bookmarks.vim
Normal file
@ -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
|
@ -8,13 +8,17 @@ CONTENTS *SpaceVim-contents*
|
|||||||
3. Functions............................................|SpaceVim-functions|
|
3. Functions............................................|SpaceVim-functions|
|
||||||
4. Layers..................................................|SpaceVim-layers|
|
4. Layers..................................................|SpaceVim-layers|
|
||||||
1. autocomplete..................................|SpaceVim-autocomplete|
|
1. autocomplete..................................|SpaceVim-autocomplete|
|
||||||
2. colorscheme....................................|SpaceVim-colorscheme|
|
2. checkers....................................|SpaceVim-layer-checkers|
|
||||||
3. lang#c........................................|SpaceVim-layer-lang-c|
|
3. colorscheme....................................|SpaceVim-colorscheme|
|
||||||
4. lang#go......................................|SpaceVim-layer-lang-go|
|
4. lang#c........................................|SpaceVim-layer-lang-c|
|
||||||
5. lang#java..................................|SpaceVim-layer-lang-java|
|
5. lang#elixir..............................|SpaceVim-layer-lang-elixir|
|
||||||
6. lang#php....................................|SpaceVim-layer-lang-php|
|
6. lang#go......................................|SpaceVim-layer-lang-go|
|
||||||
7. lang#rust..................................|SpaceVim-layer-lang-rust|
|
7. lang#java..................................|SpaceVim-layer-lang-java|
|
||||||
8. lang#xml....................................|SpaceVim-layer-lang-xml|
|
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|
|
5. FAQ........................................................|SpaceVim-faq|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
@ -214,6 +218,14 @@ To disable lint on save:
|
|||||||
let g:spacevim_lint_on_save = 0
|
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*
|
*g:spacevim_hosts_url*
|
||||||
The host file url. this option is for chinese users who can not use google and
|
The host file url. this option is for chinese users who can not use google and
|
||||||
twitter.
|
twitter.
|
||||||
@ -258,6 +270,14 @@ see |g:spacevim_enable_ycm|.
|
|||||||
SNIPPET
|
SNIPPET
|
||||||
SpaceVim use neosnippet as default snippet engine, and the default snippets is
|
SpaceVim use neosnippet as default snippet engine, and the default snippets is
|
||||||
`Shougo/neosnippet-snippets`. for more information, please read |neosnippet|.
|
`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*
|
COLORSCHEME *SpaceVim-colorscheme*
|
||||||
@ -427,6 +447,15 @@ get completions within conditional preprocessor blocks. The default is 50,
|
|||||||
setting it to 0 disables this feature.
|
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*
|
LANG#GO *SpaceVim-layer-lang-go*
|
||||||
|
|
||||||
@ -497,6 +526,16 @@ requirement:
|
|||||||
Composer Project
|
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*
|
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
|
read the document in `autoload/xmlcomplete.vim` in vim or neovim runtime
|
||||||
directory.
|
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*
|
FAQ *SpaceVim-faq*
|
||||||
|
|
||||||
|
0
filetype.vim
Normal file
0
filetype.vim
Normal file
Loading…
x
Reference in New Issue
Block a user