mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-22 17:05:42 +08:00
Merge branch 'dev' into shell-layer
This commit is contained in:
commit
520f9effba
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:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
|
227
README.md
227
README.md
@ -1,4 +1,4 @@
|
|||||||
<p align="center"><img src="logo.jpg" alt="SpaceVim"/></p>
|
<p align="center"><img src="https://github.com/SpaceVim/SpaceVim/raw/table/logo.jpg" alt="SpaceVim"/></p>
|
||||||
|
|
||||||
[](https://travis-ci.org/SpaceVim/SpaceVim)
|
[](https://travis-ci.org/SpaceVim/SpaceVim)
|
||||||

|

|
||||||
@ -13,10 +13,44 @@
|
|||||||
[](https://github.com/SpaceVim/SpaceVim)
|
[](https://github.com/SpaceVim/SpaceVim)
|
||||||
[](https://twitter.com/SpaceVim)
|
[](https://twitter.com/SpaceVim)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### Table of Contents
|
||||||
|
- [Introduction](#introduction)
|
||||||
|
- [Install](#install)
|
||||||
|
- [Linux/Mac](#linuxmac)
|
||||||
|
- [Windows support](#windows-support)
|
||||||
|
- [File Structure](#file-structure)
|
||||||
|
- Features
|
||||||
|
- [Awesome ui](#awesome-ui)
|
||||||
|
- [Language specific mode](#language-specific-mode)
|
||||||
|
- [c/c++ support](#cc-support)
|
||||||
|
- [python support](#python-support)
|
||||||
|
- [go support](#go-support)
|
||||||
|
- rust support
|
||||||
|
- php support
|
||||||
|
- perl support
|
||||||
|
- lua support
|
||||||
|
- [Unite centric work-flow](#unite-centric-work-flow)
|
||||||
|
- [Neovim centric - Dark powered mode](#neovim-centric---dark-powered-mode-of-spacevim)
|
||||||
|
- [multiple leader mode](#multiple-leader-mode)
|
||||||
|
- [Modular configuration](#modular-configuration)
|
||||||
|
- Lazy-load 90% of plugins with [dein.vim]
|
||||||
|
- Robust, yet light weight
|
||||||
|
- Extensive Neocomplete setup
|
||||||
|
- Central location for tags
|
||||||
|
- Lightweight simple status/tabline
|
||||||
|
- Premium color-schemes
|
||||||
|
- [Custom configuration](#custom-configuration)
|
||||||
|
- [Support SpaceVim](#support-spacevim)
|
||||||
|
- [Report bugs](#report-bugs)
|
||||||
|
- [contribute to SpaceVim](#contribute-to-spacevim)
|
||||||
|
- Write post about SpaceVim
|
||||||
|
|
||||||
|
#### Introduction
|
||||||
|
|
||||||
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim,
|
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim,
|
||||||
here we call them layers, each layer has different plugins and config, user just need
|
here we call them layers, each layer has different plugins and config, users just need
|
||||||
to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim,
|
to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim,
|
||||||
please star it on github. It's a great way of getting feedback and gives me the kick to
|
please star it on github. It's a great way of getting feedback and gives me the kick to
|
||||||
put more time into development.
|
put more time into development.
|
||||||
@ -30,12 +64,14 @@ For learning about Vim in general, read [vim-galore](https://github.com/mhinz/vi
|
|||||||
|
|
||||||
#### Install
|
#### Install
|
||||||
|
|
||||||
|
##### Linux/Mac
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -sLf https://spacevim.org/install.sh | bash
|
curl -sLf https://spacevim.org/install.sh | bash
|
||||||
```
|
```
|
||||||
before use SpaceVim, you should install the plugin by `call dein#install()`
|
before use SpaceVim, you should install the plugin by `call dein#install()`
|
||||||
|
|
||||||
installation of neovim/vim with python support:
|
Installation of neovim/vim with python support:
|
||||||
> [neovim installation](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
> [neovim installation](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||||
|
|
||||||
> [Building Vim from source](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source)
|
> [Building Vim from source](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source)
|
||||||
@ -49,8 +85,8 @@ curl -sLf https://spacevim.org/install.sh | bash -s -- -h
|
|||||||
##### windows support
|
##### windows support
|
||||||
|
|
||||||
- For vim in windows, please just clone this repo as vimfiles in you Home directory.
|
- For vim in windows, please just clone this repo as vimfiles in you Home directory.
|
||||||
by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd.
|
by default, when open a cmd, the current dir is your Home directory, run this command in cmd.
|
||||||
make sure you have backup your own vimfiles.
|
make sure you have a backup of your own vimfiles.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
|
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
|
||||||
@ -58,28 +94,13 @@ git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
|
|||||||
|
|
||||||
- For neovim in windows, please clone this repo as `AppData\Local\nvim` in your home directory.
|
- For neovim in windows, please clone this repo as `AppData\Local\nvim` in your home directory.
|
||||||
for more info, please check out [neovim's wiki](https://github.com/neovim/neovim/wiki/Installing-Neovim).
|
for more info, please check out [neovim's wiki](https://github.com/neovim/neovim/wiki/Installing-Neovim).
|
||||||
by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd.
|
by default, when open a cmd, the current dir is your Home directory, run this command in cmd.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
|
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Features
|
#### File Structure
|
||||||
|
|
||||||
- Neovim-centric
|
|
||||||
- [Modular configuration](#modular-configuration)
|
|
||||||
- [multiple leader mode](#multiple-leader-mode)
|
|
||||||
- Lazy-load 90% of plugins with [dein.vim]
|
|
||||||
- Robust, yet light weight
|
|
||||||
- [Unite centric work-flow](#unite-centric-work-flow)
|
|
||||||
- [Awesome ui](#awesome-ui)
|
|
||||||
- [Language specific mode](#language-specific-mode)
|
|
||||||
- Extensive Neocomplete setup
|
|
||||||
- Central location for tags
|
|
||||||
- Lightweight simple status/tabline
|
|
||||||
- Premium color-schemes
|
|
||||||
|
|
||||||
#### Structure
|
|
||||||
- [config](./config)/ - Configuration
|
- [config](./config)/ - Configuration
|
||||||
- [plugins](./config/plugins)/ - Plugin configurations
|
- [plugins](./config/plugins)/ - Plugin configurations
|
||||||
- [mappings.vim](./config/mappings.vim) - Key mappings
|
- [mappings.vim](./config/mappings.vim) - Key mappings
|
||||||
@ -97,88 +118,112 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
|
|||||||
- [init.vim](./init.vim) - Sources `config/main.vim`
|
- [init.vim](./init.vim) - Sources `config/main.vim`
|
||||||
- [vimrc](./vimrc) - Sources `config/main.vim`
|
- [vimrc](./vimrc) - Sources `config/main.vim`
|
||||||
|
|
||||||
#### Modular configuration
|
|
||||||
|
#### 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:
|
||||||
|
|
||||||
|
1. [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) - Dark powered asynchronous completion framework for neovim
|
||||||
|
2. [dein.vim](https://github.com/Shougo/dein.vim) - Dark powered Vim/Neovim plugin manager
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
|
||||||
|
1. [defx.nvim](https://github.com/Shougo/defx.nvim) - Dark powered file explorer
|
||||||
|
2. [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) - Dark powered snippet plugin
|
||||||
|
3. [denite.nvim](https://github.com/Shougo/denite.nvim) - Dark powered asynchronous unite all interfaces for Neovim/Vim8
|
||||||
|
|
||||||
|
##### Modular configuration
|
||||||
|
|
||||||
- SpaceVim will load custom configuration from `~/.local.vim` and `.local.vim` in current directory.
|
- SpaceVim will load custom configuration from `~/.local.vim` and `.local.vim` in current directory.
|
||||||
- SpaceVim support `~/.SpaceVim.d/init.vim` and `./SpaceVim.d/init.vim`.
|
- SpaceVim support `~/.SpaceVim.d/init.vim` and `./SpaceVim.d/init.vim`.
|
||||||
|
|
||||||
|
|
||||||
here is an example:
|
Here is an example:
|
||||||
|
|
||||||
```viml
|
```viml
|
||||||
" here are some basic customizations, please refer to the top of the vimrc
|
" Here are some basic customizations, please refer to the top of the vimrc
|
||||||
" file for all possible options
|
" file for all possible options:
|
||||||
let g:spacevim_default_indent = 3
|
let g:spacevim_default_indent = 3
|
||||||
let g:spacevim_max_column = 80
|
let g:spacevim_max_column = 80
|
||||||
let g:spacevim_colorscheme = 'my_awesome_colorscheme'
|
let g:spacevim_colorscheme = 'my_awesome_colorscheme'
|
||||||
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
|
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
|
||||||
|
|
||||||
" change the default directory where all miscellaneous persistent files go
|
" Change the default directory where all miscellaneous persistent files go.
|
||||||
" by default it is ~/.cache/vimfiles
|
" By default it is ~/.cache/vimfiles.
|
||||||
let g:spacevim_plugin_bundle_dir = "/some/place/else"
|
let g:spacevim_plugin_bundle_dir = "/some/place/else"
|
||||||
|
|
||||||
" by default, language specific plugins are not loaded. this can be changed
|
" By default, language specific plugins are not loaded. This can be changed
|
||||||
" with the following:
|
" with the following:
|
||||||
let g:spacevim_plugin_groups_exclude = ['ruby', 'python']
|
let g:spacevim_plugin_groups_exclude = ['ruby', 'python']
|
||||||
|
|
||||||
" if there are groups you want always loaded, you can use this:
|
" If there are groups you want always loaded, you can use this:
|
||||||
let g:spacevim_plugin_groups_include = ['go']
|
let g:spacevim_plugin_groups_include = ['go']
|
||||||
|
|
||||||
" alternatively, you can set this variable to load exactly what you want
|
" Alternatively, you can set this variable to load exactly what you want:
|
||||||
let g:spacevim_plugin_groups = ['core', 'web']
|
let g:spacevim_plugin_groups = ['core', 'web']
|
||||||
|
|
||||||
" if there is a particular plugin you don't like, you can define this
|
" If there is a particular plugin you don't like, you can define this
|
||||||
" variable to disable them entirely
|
" variable to disable them entirely:
|
||||||
let g:spacevim_disabled_plugins=['vim-foo', 'vim-bar']
|
let g:spacevim_disabled_plugins=['vim-foo', 'vim-bar']
|
||||||
" if you want to add some custom plugins, use this options.
|
" If you want to add some custom plugins, use these options:
|
||||||
let g:spacevim_custom_plugins = [
|
let g:spacevim_custom_plugins = [
|
||||||
\ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}],
|
\ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}],
|
||||||
\ ['wsdjeg/GitHub.vim'],
|
\ ['wsdjeg/GitHub.vim'],
|
||||||
\ ]
|
\ ]
|
||||||
|
|
||||||
" anything defined here are simply overrides
|
" Anything defined here are simply overrides
|
||||||
set wildignore+=\*/node_modules/\*
|
set wildignore+=\*/node_modules/\*
|
||||||
set guifont=Wingdings:h10
|
set guifont=Wingdings:h10
|
||||||
```
|
```
|
||||||
|
|
||||||
#### multiple leader mode
|
#### Multiple leader mode
|
||||||
##### global origin vim leader, default : `\`
|
##### Global origin vim leader, default : `\`
|
||||||
vim's origin global leader can be used in all the mode.
|
Vim's origin global leader can be used in all modes.
|
||||||
##### local origin vim leader, default : `,`
|
##### Local origin vim leader, default : `,`
|
||||||
vim's origin local leader can be used in all the mode.
|
Vim's origin local leader can be used in all the mode.
|
||||||
##### windows function leader, default : `s`
|
##### Windows function leader, default : `s`
|
||||||
windows function leader can only be used in normal mode.
|
Windows function leader can only be used in normal mode.
|
||||||
for the list of mappings see the [link](#window-management)
|
For the list of mappings see the [link](#window-management)
|
||||||
##### unite work flow leader, default : `f`
|
##### Unite work flow leader, default : `f`
|
||||||
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
|
||||||
|
|
||||||
@ -282,7 +327,7 @@ Name | Description
|
|||||||
|
|
||||||
Name | Description
|
Name | Description
|
||||||
-------------- | ----------------------
|
-------------- | ----------------------
|
||||||
[delimitmate] | Insert mode auto-completion for quotes, parens, brackets
|
[delimitmate] | Insert mode auto-completion for quotes, parenthesis, brackets
|
||||||
[echodoc] | Print objects' documentation in echo area
|
[echodoc] | Print objects' documentation in echo area
|
||||||
[deoplete] | Neovim: Dark powered asynchronous completion framework
|
[deoplete] | Neovim: Dark powered asynchronous completion framework
|
||||||
[neocomplete] | Next generation completion framework
|
[neocomplete] | Next generation completion framework
|
||||||
@ -513,18 +558,16 @@ Key | Mode | Action
|
|||||||
`<leader>`+`gd` | Normal | Git diff
|
`<leader>`+`gd` | Normal | Git diff
|
||||||
`<leader>`+`gc` | Normal | Git commit
|
`<leader>`+`gc` | Normal | Git commit
|
||||||
`<leader>`+`gb` | Normal | Git blame
|
`<leader>`+`gb` | Normal | Git blame
|
||||||
`<leader>`+`gB` | Normal | Open in browser
|
|
||||||
`<leader>`+`gp` | Normal | Git push
|
`<leader>`+`gp` | Normal | Git push
|
||||||
|
|
||||||
##### Plugin: GitGutter
|
##### Plugin: vim-signify
|
||||||
|
|
||||||
Key | Mode | Action
|
Key | Mode | Action
|
||||||
----- |:----:| ------------------
|
----- |:----:| ------------------
|
||||||
`<leader>`+`hj` | Normal | Jump to next hunk
|
`<leader>`+`hj` / `]c` | Normal | Jump to next hunk
|
||||||
`<leader>`+`hk` | Normal | Jump to previous hunk
|
`<leader>`+`hk` / `[c` | Normal | Jump to previous hunk
|
||||||
`<leader>`+`hs` | Normal | Stage hunk
|
`<leader>`+`hJ` / `]C` | Normal | Jump to last hunk
|
||||||
`<leader>`+`hr` | Normal | Revert hunk
|
`<leader>`+`hK` / `[C` | Normal | Jump to first hunk
|
||||||
`<leader>`+`hp` | Normal | Preview hunk
|
|
||||||
|
|
||||||
##### Misc Plugins
|
##### Misc Plugins
|
||||||
|
|
||||||
@ -538,6 +581,40 @@ Key | Mode | Action
|
|||||||
`<leader>`+`W` | Normal | Wiki
|
`<leader>`+`W` | Normal | Wiki
|
||||||
`<leader>`+`K` | Normal | Thesaurus
|
`<leader>`+`K` | Normal | Thesaurus
|
||||||
|
|
||||||
|
#### Custom configuration
|
||||||
|
SpaceVim use `~/.SpaceVim.d/init.vim` as default global init file. you can set
|
||||||
|
SpaceVim-options or config layers in it. SpaceVim also will add `~/.SpaceVim.d/`
|
||||||
|
into runtimepath. so you can write your own vim script in it.
|
||||||
|
|
||||||
|
SpaceVim also support local config file for project, the init file is `.SpaceVim.d/init.vim`
|
||||||
|
in the root of your project. `.SpaceVim.d/` will also be added into runtimepath.
|
||||||
|
|
||||||
|
here is an example config file for SpaceVim:
|
||||||
|
```viml
|
||||||
|
" set the options of SpaceVim
|
||||||
|
let g:spacevim_colorscheme = 'solarized'
|
||||||
|
|
||||||
|
" setting layers, load 'lang#java' layer.
|
||||||
|
call SpaceVim#layers#load('lang#java')
|
||||||
|
|
||||||
|
" add custom plugins.
|
||||||
|
let g:spacevim_custom_plugins = [
|
||||||
|
\ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}],
|
||||||
|
\ ['wsdjeg/GitHub.vim'],
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
" custom mappings:
|
||||||
|
nnoremap <c-l> :Ydc<cr>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Support SpaceVim
|
||||||
|
|
||||||
|
##### report bugs
|
||||||
|
|
||||||
|
If you get any issues, please open an issue with the ISSUE_TEMPLATE. It is useful for me to debug for this issue.
|
||||||
|
|
||||||
|
##### contribute to SpaceVim
|
||||||
|
|
||||||
#### Enjoy!
|
#### Enjoy!
|
||||||
|
|
||||||
#### Credits & Thanks
|
#### Credits & Thanks
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" @section Introduction, intro
|
" @section Introduction, intro
|
||||||
" @stylized Maktaba
|
" @stylized Maktaba
|
||||||
" @library
|
" @library
|
||||||
" @order intro version dicts functions exceptions layers autocomplete colorscheme layer_lang_java layer_lang_php layer_lang_c layer-lang-rust faq
|
" @order intro version dicts functions exceptions layers faq
|
||||||
" SpaceVim is a Modular configuration, a bundle of custom settings
|
" SpaceVim is a Modular configuration, a bundle of custom settings
|
||||||
" and plugins, for Vim. It got inspired by spacemacs.
|
" and plugins, for Vim. It got inspired by spacemacs.
|
||||||
"
|
"
|
||||||
@ -117,6 +117,13 @@ let g:spacevim_use_colorscheme = 1
|
|||||||
" <
|
" <
|
||||||
let g:spacevim_vim_help_language = 'en'
|
let g:spacevim_vim_help_language = 'en'
|
||||||
""
|
""
|
||||||
|
" Set the message language of vim. By default it is empty, and the language is
|
||||||
|
" en_US.UTF-8. example:
|
||||||
|
" >
|
||||||
|
" let g:spacevim_language = 'en_CA.utf8'
|
||||||
|
" <
|
||||||
|
let g:spacevim_language = ''
|
||||||
|
""
|
||||||
" The colorscheme of SpaceVim, if colorscheme groups are installed.
|
" The colorscheme of SpaceVim, if colorscheme groups are installed.
|
||||||
let g:spacevim_colorscheme = 'gruvbox'
|
let g:spacevim_colorscheme = 'gruvbox'
|
||||||
""
|
""
|
||||||
@ -306,9 +313,11 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! SpaceVim#welcome() abort
|
function! SpaceVim#welcome() abort
|
||||||
|
if exists(':VimFiler') == 2 && exists(':Startify') == 2
|
||||||
VimFiler
|
VimFiler
|
||||||
wincmd p
|
wincmd p
|
||||||
Startify
|
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
|
||||||
@ -44,6 +47,9 @@ function! SpaceVim#default#SetOptions() abort
|
|||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
|
|
||||||
|
" autoread
|
||||||
|
set autoread
|
||||||
|
|
||||||
" backup
|
" backup
|
||||||
set backup
|
set backup
|
||||||
set undofile
|
set undofile
|
||||||
@ -75,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
|
||||||
@ -362,6 +367,7 @@ function! SpaceVim#default#SetMappings() abort
|
|||||||
call SpaceVim#mapping#def('nnoremap <silent>', '<Leader>sg', ':vsplit<CR>:wincmd p<CR>:e#<CR>',
|
call SpaceVim#mapping#def('nnoremap <silent>', '<Leader>sg', ':vsplit<CR>:wincmd p<CR>:e#<CR>',
|
||||||
\'Open previous buffer in vsplit window' , 'vsplit|wincmd p|e#')
|
\'Open previous buffer in vsplit window' , 'vsplit|wincmd p|e#')
|
||||||
call SpaceVim#mapping#def('nnoremap <silent>', 'gf', ':call zvim#gf()<CR>', 'Jump to a file under cursor', '')
|
call SpaceVim#mapping#def('nnoremap <silent>', 'gf', ':call zvim#gf()<CR>', 'Jump to a file under cursor', '')
|
||||||
|
call SpaceVim#mapping#def('nnoremap <silent>', 'gd', ':call SpaceVim#mapping#gd()<CR>', 'Goto declaration', '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
fu! s:tobur(num) abort
|
fu! s:tobur(num) abort
|
||||||
|
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
|
0
autoload/SpaceVim/health/clipboard.vim
Normal file
0
autoload/SpaceVim/health/clipboard.vim
Normal file
0
autoload/SpaceVim/health/lua.vim
Normal file
0
autoload/SpaceVim/health/lua.vim
Normal file
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
|
@ -1,5 +1,7 @@
|
|||||||
""
|
""
|
||||||
" @section Autocomplete, autocomplete
|
" @section autocomplete, autocomplete
|
||||||
|
" @parentsection layers
|
||||||
|
" @subsection code completion
|
||||||
" SpaceVim use neocomplete as default completion engine for vim with lua
|
" SpaceVim use neocomplete as default completion engine for vim with lua
|
||||||
" support, if has no lua support neocomplcache will be the completion engine.
|
" support, if has no lua support neocomplcache will be the completion engine.
|
||||||
" SpaceVim use deoplete as default completion engine for nevoim. to make
|
" SpaceVim use deoplete as default completion engine for nevoim. to make
|
||||||
@ -7,6 +9,11 @@
|
|||||||
"
|
"
|
||||||
" SpaceVim include YouCompleteMe, but it is disabled by default, to enable
|
" SpaceVim include YouCompleteMe, but it is disabled by default, to enable
|
||||||
" ycm, see |g:spacevim_enable_ycm|.
|
" ycm, see |g:spacevim_enable_ycm|.
|
||||||
|
"
|
||||||
|
" @subsection snippet
|
||||||
|
" SpaceVim use neosnippet as default snippet engine, and the default snippets
|
||||||
|
" is `Shougo/neosnippet-snippets`. for more information, please read
|
||||||
|
" |neosnippet|.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -15,7 +22,6 @@ function! SpaceVim#layers#autocomplete#plugins() abort
|
|||||||
\ ['honza/vim-snippets', {'on_i' : 1, 'loadconf_before' : 1}],
|
\ ['honza/vim-snippets', {'on_i' : 1, 'loadconf_before' : 1}],
|
||||||
\ ['Shougo/neco-syntax', { 'on_i' : 1}],
|
\ ['Shougo/neco-syntax', { 'on_i' : 1}],
|
||||||
\ ['ujihisa/neco-look', { 'on_i' : 1}],
|
\ ['ujihisa/neco-look', { 'on_i' : 1}],
|
||||||
\ ['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}],
|
|
||||||
\ ['Shougo/context_filetype.vim', { 'on_i' : 1}],
|
\ ['Shougo/context_filetype.vim', { 'on_i' : 1}],
|
||||||
\ ['Shougo/neoinclude.vim', { 'on_i' : 1}],
|
\ ['Shougo/neoinclude.vim', { 'on_i' : 1}],
|
||||||
\ ['Shougo/neosnippet-snippets', { 'merged' : 0}],
|
\ ['Shougo/neosnippet-snippets', { 'merged' : 0}],
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
""
|
""
|
||||||
" @section Colorscheme, colorscheme
|
" @section colorscheme, colorscheme
|
||||||
|
" @parentsection layers
|
||||||
" SpaceVim default colorscheme is gruvbox, you can change it by set spacevim
|
" SpaceVim default colorscheme is gruvbox, you can change it by set spacevim
|
||||||
" option. add this to your `~/.SpaceVim.d/init.vim`
|
" option. add this to your `~/.SpaceVim.d/init.vim`
|
||||||
" >
|
" >
|
||||||
|
@ -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'}],
|
||||||
|
@ -10,5 +10,17 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! SpaceVim#layers#git#config() abort
|
function! SpaceVim#layers#git#config() abort
|
||||||
|
nnoremap <silent> <Leader>gs :Gita status<CR>
|
||||||
|
nnoremap <silent> <Leader>gd :Gita diff<CR>
|
||||||
|
nnoremap <silent> <Leader>gc :Gita commit<CR>
|
||||||
|
nnoremap <silent> <Leader>gb :Gita blame<CR>
|
||||||
|
nnoremap <silent> <Leader>gp :Gita push<CR>
|
||||||
|
nmap <leader>hj <plug>(signify-next-hunk)
|
||||||
|
nmap <leader>hk <plug>(signify-prev-hunk)
|
||||||
|
nmap <leader>hJ 9999<leader>gj
|
||||||
|
nmap <leader>hK 9999<leader>gk
|
||||||
|
augroup spacevim_layer_git
|
||||||
|
autocmd!
|
||||||
|
autocmd FileType diff nnoremap <buffer><silent> q :bd!<CR>
|
||||||
|
augroup END
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -10,7 +10,6 @@ function! SpaceVim#layers#lang#plugins() abort
|
|||||||
\ ['wavded/vim-stylus', { 'on_ft' : ['styl']}],
|
\ ['wavded/vim-stylus', { 'on_ft' : ['styl']}],
|
||||||
\ ['digitaltoad/vim-jade', { 'on_ft' : ['jade']}],
|
\ ['digitaltoad/vim-jade', { 'on_ft' : ['jade']}],
|
||||||
\ ['juvenn/mustache.vim', { 'on_ft' : ['mustache']}],
|
\ ['juvenn/mustache.vim', { 'on_ft' : ['mustache']}],
|
||||||
\ ['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}],
|
|
||||||
\ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}],
|
\ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}],
|
||||||
\ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}],
|
\ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}],
|
||||||
\ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}],
|
\ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}],
|
||||||
@ -25,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
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
""
|
""
|
||||||
" @section Layer_lang_c
|
" @section lang#c, layer-lang-c
|
||||||
|
" @parentsection layers
|
||||||
" this layer provide c family language code completion and syntax chaeck.you
|
" this layer provide c family language code completion and syntax chaeck.you
|
||||||
" need install clang.
|
" need install clang.
|
||||||
"
|
"
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
""
|
||||||
|
" @section lang#go, layer-lang-go
|
||||||
|
" @parentsection layers
|
||||||
|
" This layer support go development, include code completion and syntax check.
|
||||||
|
" @subsection mappings
|
||||||
|
" >
|
||||||
|
" mode key function
|
||||||
|
" normal <leader>gi go implements
|
||||||
|
" normal <leader>gf go info
|
||||||
|
" normal <leader>ge go rename
|
||||||
|
" normal <leader>gr go run
|
||||||
|
" normal <leader>gb go build
|
||||||
|
" normal <leader>gt go test
|
||||||
|
" normal <leader>gd go doc
|
||||||
|
" normal <leader>gv go doc vertical
|
||||||
|
" normal <leader>gco go coverage
|
||||||
|
" <
|
||||||
|
|
||||||
|
|
||||||
function! SpaceVim#layers#lang#go#plugins() abort
|
function! SpaceVim#layers#lang#go#plugins() abort
|
||||||
let plugins = [['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}]]
|
let plugins = [['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}]]
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
@ -16,18 +35,18 @@ function! SpaceVim#layers#lang#go#config() abort
|
|||||||
let g:go_fmt_command = 'goimports'
|
let g:go_fmt_command = 'goimports'
|
||||||
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
|
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
|
||||||
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
|
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
|
||||||
let g:go_snippet_engine = "neosnippet"
|
let g:go_snippet_engine = 'neosnippet'
|
||||||
|
|
||||||
augroup SpaceVim_go
|
augroup SpaceVim_go
|
||||||
au!
|
au!
|
||||||
au FileType go nmap <Buffer><Leader>s <Plug>(go-implements)
|
au FileType go nmap <Buffer><silent><Leader>s <Plug>(go-implements)
|
||||||
au FileType go nmap <Buffer><Leader>i <Plug>(go-info)
|
au FileType go nmap <Buffer><silent><Leader>i <Plug>(go-info)
|
||||||
au FileType go nmap <Buffer><Leader>e <Plug>(go-rename)
|
au FileType go nmap <Buffer><silent><Leader>e <Plug>(go-rename)
|
||||||
au FileType go nmap <Buffer><Leader>r <Plug>(go-run)
|
au FileType go nmap <Buffer><silent><Leader>r <Plug>(go-run)
|
||||||
au FileType go nmap <Buffer><Leader>b <Plug>(go-build)
|
au FileType go nmap <Buffer><silent><Leader>b <Plug>(go-build)
|
||||||
au FileType go nmap <Buffer><Leader>t <Plug>(go-test)
|
au FileType go nmap <Buffer><silent><Leader>t <Plug>(go-test)
|
||||||
au FileType go nmap <Buffer><Leader>gd <Plug>(go-doc)
|
au FileType go nmap <Buffer><silent><Leader>gd <Plug>(go-doc)
|
||||||
au FileType go nmap <Buffer><Leader>gv <Plug>(go-doc-vertical)
|
au FileType go nmap <Buffer><silent><Leader>gv <Plug>(go-doc-vertical)
|
||||||
au FileType go nmap <Buffer><Leader>co <Plug>(go-coverage)
|
au FileType go nmap <Buffer><silent><Leader>co <Plug>(go-coverage)
|
||||||
augroup END
|
augroup END
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
""
|
""
|
||||||
" @section Layer_lang_java, layer_lang_java
|
" @section lang#java, layer-lang-java
|
||||||
|
" @parentsection layers
|
||||||
" This layer is for java development.
|
" This layer is for java development.
|
||||||
" >
|
" >
|
||||||
" import-mappings:
|
" import-mappings:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
""
|
""
|
||||||
" @section Layer_lang_php
|
" @section lang#php, layer-lang-php
|
||||||
|
" @parentsection layers
|
||||||
" this layer is for php development, and it provide auto codo completion,
|
" this layer is for php development, and it provide auto codo completion,
|
||||||
" and syntax check, and jump to the definition location.
|
" and syntax check, and jump to the definition location.
|
||||||
"
|
"
|
||||||
|
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
|
@ -1,5 +1,6 @@
|
|||||||
""
|
""
|
||||||
" @section layer-lang-rust, layer-lang-rust
|
" @section lang#rust, layer-lang-rust
|
||||||
|
" @parentsection layers
|
||||||
" SpaceVim do not load this layer by default, if you are a rust developer, you
|
" SpaceVim do not load this layer by default, if you are a rust developer, you
|
||||||
" should add `call SpaceVim#layers#load('lang#rust')` to your @section(config)
|
" should add `call SpaceVim#layers#load('lang#rust')` to your @section(config)
|
||||||
"
|
"
|
||||||
|
12
autoload/SpaceVim/layers/lang/vim.vim
Normal file
12
autoload/SpaceVim/layers/lang/vim.vim
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
function! SpaceVim#layers#lang#vim#plugins() abort
|
||||||
|
let plugins = []
|
||||||
|
call add(plugins,['tweekmonster/exception.vim'])
|
||||||
|
call add(plugins,['mhinz/vim-lookup'])
|
||||||
|
call add(plugins,['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}])
|
||||||
|
call add(plugins,['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}])
|
||||||
|
return plugins
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#layers#lang#vim#config() abort
|
||||||
|
call SpaceVim#mapping#gd#add('vim','lookup#lookup')
|
||||||
|
endfunction
|
18
autoload/SpaceVim/layers/lang/xml.vim
Normal file
18
autoload/SpaceVim/layers/lang/xml.vim
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
""
|
||||||
|
" @section lang#xml, layer-lang-xml
|
||||||
|
" @parentsection layers
|
||||||
|
" when edite an xml file, the omni func is `xmlcomplete#CompleteTags`, you can
|
||||||
|
" read the document in `autoload/xmlcomplete.vim` in vim or neovim
|
||||||
|
" runtime directory.
|
||||||
|
|
||||||
|
|
||||||
|
function! SpaceVim#layers#lang#xml#plugins() abort
|
||||||
|
let plugins = []
|
||||||
|
call add(plugins,['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}])
|
||||||
|
call add(plugins,['sukima/xmledit', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}])
|
||||||
|
return plugins
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#layers#lang#xml#config() abort
|
||||||
|
|
||||||
|
endfunction
|
@ -4,9 +4,10 @@ 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}],
|
||||||
|
\ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}],
|
||||||
\ ['Yggdroot/LeaderF', {'merged' : 0}],
|
\ ['Yggdroot/LeaderF', {'merged' : 0}],
|
||||||
|
\ ['MattesGroeger/vim-bookmarks', { 'on_map' : '<Plug>Bookmark', 'loadconf_before' : 1}],
|
||||||
\ ['google/vim-searchindex'],
|
\ ['google/vim-searchindex'],
|
||||||
\ ['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}],
|
|
||||||
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
||||||
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
|
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
|
||||||
\ ['mhinz/vim-grepper' , { 'on_cmd' : 'Grepper', 'loadconf' : 1} ],
|
\ ['mhinz/vim-grepper' , { 'on_cmd' : 'Grepper', 'loadconf' : 1} ],
|
||||||
@ -34,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
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -56,3 +56,11 @@ function! SpaceVim#mapping#enter() abort
|
|||||||
return "\<Enter>"
|
return "\<Enter>"
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#mapping#gd() abort
|
||||||
|
if !empty(SpaceVim#mapping#gd#get())
|
||||||
|
call call(SpaceVim#mapping#gd#get(), [])
|
||||||
|
else
|
||||||
|
normal! gd
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
8
autoload/SpaceVim/mapping/gd.vim
Normal file
8
autoload/SpaceVim/mapping/gd.vim
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
let s:gd = {}
|
||||||
|
function! SpaceVim#mapping#gd#add(ft, func) abort
|
||||||
|
call extend(s:gd,{a:ft : a:func})
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#mapping#gd#get() abort
|
||||||
|
return get(s:gd, &filetype, '')
|
||||||
|
endfunction
|
@ -1,11 +1,25 @@
|
|||||||
function! SpaceVim#options#list() abort
|
function! SpaceVim#options#list() abort
|
||||||
let list = []
|
let list = []
|
||||||
if has('patch-7.4.2010')
|
if has('patch-7.4.2010') && 0
|
||||||
for var in getcompletion('g:spacevim_','var')
|
for var in getcompletion('g:spacevim_','var')
|
||||||
call add(list, var . ' = ' . string(get(g:, var[2:] , '')))
|
call add(list, var . ' = ' . string(get(g:, var[2:] , '')))
|
||||||
endfor
|
endfor
|
||||||
else
|
else
|
||||||
call add(list, 'your vim is too old, getcompletion() need patch7-4-2010')
|
redraw
|
||||||
|
for var in filter(map(s:execute('let g:'), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'")
|
||||||
|
call add(list,'g:' . var . ' = ' . string(get(g:, var , '')))
|
||||||
|
endfor
|
||||||
endif
|
endif
|
||||||
return list
|
return list
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:execute(cmd) abort
|
||||||
|
if exists('*execute')
|
||||||
|
return split(execute(a:cmd), "\n")
|
||||||
|
endif
|
||||||
|
|
||||||
|
redir => output
|
||||||
|
execute a:cmd
|
||||||
|
redir END
|
||||||
|
return split(output, "\n")
|
||||||
|
endfunction
|
||||||
|
@ -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 . ']'
|
||||||
|
@ -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,16 +1,24 @@
|
|||||||
|
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
|
||||||
|
if exists(':Limelight') == 2
|
||||||
Limelight
|
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()
|
||||||
|
@ -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
|
||||||
|
\ }
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
nnoremap <leader>gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('<cword>')<CR>
|
"nnoremap <leader>gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('<cword>')<CR>
|
||||||
nnoremap <leader>gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context'<CR>
|
"nnoremap <leader>gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context'<CR>
|
||||||
nnoremap <leader>gr :execute 'Unite -auto-preview -start-insert -no-split gtags/ref'<CR>
|
nnoremap <leader>gr :execute 'Unite -auto-preview -start-insert -no-split gtags/ref'<CR>
|
||||||
nnoremap <leader>gg :execute 'Unite -auto-preview -start-insert -no-split gtags/grep'<CR>
|
nnoremap <leader>gg :execute 'Unite -auto-preview -start-insert -no-split gtags/grep'<CR>
|
||||||
nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR>
|
"nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR>
|
||||||
vnoremap <leader>gd <ESC>:execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.GetVisualSelection()<CR>
|
vnoremap <leader>gd <ESC>:execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.GetVisualSelection()<CR>
|
||||||
let g:unite_source_gtags_project_config = {
|
let g:unite_source_gtags_project_config = {
|
||||||
\ '_': { 'treelize': 0 }
|
\ '_': { 'treelize': 0 }
|
||||||
|
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
|
171
doc/SpaceVim.txt
171
doc/SpaceVim.txt
@ -7,13 +7,16 @@ CONTENTS *SpaceVim-contents*
|
|||||||
2. CONFIGURATION...........................................|SpaceVim-config|
|
2. CONFIGURATION...........................................|SpaceVim-config|
|
||||||
3. Functions............................................|SpaceVim-functions|
|
3. Functions............................................|SpaceVim-functions|
|
||||||
4. Layers..................................................|SpaceVim-layers|
|
4. Layers..................................................|SpaceVim-layers|
|
||||||
5. Autocomplete......................................|SpaceVim-autocomplete|
|
1. autocomplete..................................|SpaceVim-autocomplete|
|
||||||
6. Colorscheme........................................|SpaceVim-colorscheme|
|
2. colorscheme....................................|SpaceVim-colorscheme|
|
||||||
7. Layer_lang_java................................|SpaceVim-layer_lang_java|
|
3. lang#c........................................|SpaceVim-layer-lang-c|
|
||||||
8. Layer_lang_php..................................|SpaceVim-layer_lang_php|
|
4. lang#go......................................|SpaceVim-layer-lang-go|
|
||||||
9. Layer_lang_c......................................|SpaceVim-layer_lang_c|
|
5. lang#java..................................|SpaceVim-layer-lang-java|
|
||||||
10. layer-lang-rust...............................|SpaceVim-layer-lang-rust|
|
6. lang#php....................................|SpaceVim-layer-lang-php|
|
||||||
11. FAQ.......................................................|SpaceVim-faq|
|
7. lang#python..............................|SpaceVim-layer-lang-python|
|
||||||
|
8. lang#rust..................................|SpaceVim-layer-lang-rust|
|
||||||
|
9. lang#xml....................................|SpaceVim-layer-lang-xml|
|
||||||
|
5. FAQ........................................................|SpaceVim-faq|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
INTRODUCTION *SpaceVim-intro*
|
INTRODUCTION *SpaceVim-intro*
|
||||||
@ -119,6 +122,13 @@ chinese.
|
|||||||
let g:spacevim_vim_help_language = 'chinese'
|
let g:spacevim_vim_help_language = 'chinese'
|
||||||
<
|
<
|
||||||
|
|
||||||
|
*g:spacevim_language*
|
||||||
|
Set the message language of vim. By default it is empty, and the language is
|
||||||
|
en_US.UTF-8. example:
|
||||||
|
>
|
||||||
|
let g:spacevim_language = 'en_CA.utf8'
|
||||||
|
<
|
||||||
|
|
||||||
*g:spacevim_colorscheme*
|
*g:spacevim_colorscheme*
|
||||||
The colorscheme of SpaceVim, if colorscheme groups are installed.
|
The colorscheme of SpaceVim, if colorscheme groups are installed.
|
||||||
|
|
||||||
@ -237,6 +247,7 @@ LAYERS *SpaceVim-layers*
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
AUTOCOMPLETE *SpaceVim-autocomplete*
|
AUTOCOMPLETE *SpaceVim-autocomplete*
|
||||||
|
|
||||||
|
CODE COMPLETION
|
||||||
SpaceVim use neocomplete as default completion engine for vim with lua
|
SpaceVim use neocomplete as default completion engine for vim with lua
|
||||||
support, if has no lua support neocomplcache will be the completion engine.
|
support, if has no lua support neocomplcache will be the completion engine.
|
||||||
SpaceVim use deoplete as default completion engine for nevoim. to make neovim
|
SpaceVim use deoplete as default completion engine for nevoim. to make neovim
|
||||||
@ -245,6 +256,10 @@ support python, please read neovim's |provider-python|.
|
|||||||
SpaceVim include YouCompleteMe, but it is disabled by default, to enable ycm,
|
SpaceVim include YouCompleteMe, but it is disabled by default, to enable ycm,
|
||||||
see |g:spacevim_enable_ycm|.
|
see |g:spacevim_enable_ycm|.
|
||||||
|
|
||||||
|
SNIPPET
|
||||||
|
SpaceVim use neosnippet as default snippet engine, and the default snippets is
|
||||||
|
`Shougo/neosnippet-snippets`. for more information, please read |neosnippet|.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
COLORSCHEME *SpaceVim-colorscheme*
|
COLORSCHEME *SpaceVim-colorscheme*
|
||||||
|
|
||||||
@ -377,58 +392,7 @@ colorschemes: if the colorscheme you want do not list below, PR welcome.
|
|||||||
<
|
<
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
LAYER_LANG_JAVA *SpaceVim-layer_lang_java*
|
LANG#C *SpaceVim-layer-lang-c*
|
||||||
|
|
||||||
This layer is for java development.
|
|
||||||
>
|
|
||||||
import-mappings:
|
|
||||||
mode key function
|
|
||||||
normal <F4> import class under corsor.
|
|
||||||
insert <F4> import class under corsor.
|
|
||||||
normal <leader>jI import missing classes.
|
|
||||||
normal <leader>jR remove unused imports.
|
|
||||||
normal <leader>ji smart import class under corsor.
|
|
||||||
normal <leader>jii same as <F4>
|
|
||||||
insert <c-j>I import missing imports.
|
|
||||||
insert <c-j>R remove unused imports.
|
|
||||||
insert <c-j>i smart import class under corsor.
|
|
||||||
insert <c-j>ii add import for class under corsor.
|
|
||||||
|
|
||||||
generate-mappings:
|
|
||||||
mode key function
|
|
||||||
normal <leader>jA generate accessors.
|
|
||||||
normal <leader>js generate setter accessor.
|
|
||||||
normal <leader>jg generate getter accessor.
|
|
||||||
normal <leader>ja generate setter and getter accessor.
|
|
||||||
normal <leader>jts generate toString function.
|
|
||||||
normal <leader>jeq generate equals and hashcode function.
|
|
||||||
normal <leader>jc generate constructor.
|
|
||||||
normal <leader>jcc generate default constructor.
|
|
||||||
insert <c-j>s generate setter accessor.
|
|
||||||
insert <c-j>g generate getter accessor.
|
|
||||||
insert <c-j>a generate getter and setter accessor.
|
|
||||||
visual <leader>js generate setter accessor.
|
|
||||||
visual <leader>jg generate getter accessor.
|
|
||||||
visual <leader>ja generate setter and getter acctssor.
|
|
||||||
<
|
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
LAYER_LANG_PHP *SpaceVim-layer_lang_php*
|
|
||||||
|
|
||||||
this layer is for php development, and it provide auto codo completion, and
|
|
||||||
syntax check, and jump to the definition location.
|
|
||||||
|
|
||||||
requirement:
|
|
||||||
>
|
|
||||||
PHP 5.3+
|
|
||||||
PCNTL Extension
|
|
||||||
Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
|
|
||||||
Composer Project
|
|
||||||
<
|
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
LAYER_LANG_C *SpaceVim-layer_lang_c*
|
|
||||||
|
|
||||||
this layer provide c family language code completion and syntax chaeck.you
|
this layer provide c family language code completion and syntax chaeck.you
|
||||||
need install clang.
|
need install clang.
|
||||||
@ -465,7 +429,87 @@ setting it to 0 disables this feature.
|
|||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
LAYER-LANG-RUST *SpaceVim-layer-lang-rust*
|
LANG#GO *SpaceVim-layer-lang-go*
|
||||||
|
|
||||||
|
This layer support go development, include code completion and syntax check.
|
||||||
|
MAPPINGS
|
||||||
|
|
||||||
|
>
|
||||||
|
mode key function
|
||||||
|
normal <leader>gi go implements
|
||||||
|
normal <leader>gf go info
|
||||||
|
normal <leader>ge go rename
|
||||||
|
normal <leader>gr go run
|
||||||
|
normal <leader>gb go build
|
||||||
|
normal <leader>gt go test
|
||||||
|
normal <leader>gd go doc
|
||||||
|
normal <leader>gv go doc vertical
|
||||||
|
normal <leader>gco go coverage
|
||||||
|
<
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
LANG#JAVA *SpaceVim-layer-lang-java*
|
||||||
|
|
||||||
|
This layer is for java development.
|
||||||
|
>
|
||||||
|
import-mappings:
|
||||||
|
mode key function
|
||||||
|
normal <F4> import class under corsor.
|
||||||
|
insert <F4> import class under corsor.
|
||||||
|
normal <leader>jI import missing classes.
|
||||||
|
normal <leader>jR remove unused imports.
|
||||||
|
normal <leader>ji smart import class under corsor.
|
||||||
|
normal <leader>jii same as <F4>
|
||||||
|
insert <c-j>I import missing imports.
|
||||||
|
insert <c-j>R remove unused imports.
|
||||||
|
insert <c-j>i smart import class under corsor.
|
||||||
|
insert <c-j>ii add import for class under corsor.
|
||||||
|
|
||||||
|
generate-mappings:
|
||||||
|
mode key function
|
||||||
|
normal <leader>jA generate accessors.
|
||||||
|
normal <leader>js generate setter accessor.
|
||||||
|
normal <leader>jg generate getter accessor.
|
||||||
|
normal <leader>ja generate setter and getter accessor.
|
||||||
|
normal <leader>jts generate toString function.
|
||||||
|
normal <leader>jeq generate equals and hashcode function.
|
||||||
|
normal <leader>jc generate constructor.
|
||||||
|
normal <leader>jcc generate default constructor.
|
||||||
|
insert <c-j>s generate setter accessor.
|
||||||
|
insert <c-j>g generate getter accessor.
|
||||||
|
insert <c-j>a generate getter and setter accessor.
|
||||||
|
visual <leader>js generate setter accessor.
|
||||||
|
visual <leader>jg generate getter accessor.
|
||||||
|
visual <leader>ja generate setter and getter acctssor.
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
LANG#PHP *SpaceVim-layer-lang-php*
|
||||||
|
|
||||||
|
this layer is for php development, and it provide auto codo completion, and
|
||||||
|
syntax check, and jump to the definition location.
|
||||||
|
|
||||||
|
requirement:
|
||||||
|
>
|
||||||
|
PHP 5.3+
|
||||||
|
PCNTL Extension
|
||||||
|
Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
|
||||||
|
Composer Project
|
||||||
|
<
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
LANG#PYTHON *SpaceVim-layer-lang-python*
|
||||||
|
|
||||||
|
To make this layer works well, you should install jedi.
|
||||||
|
MAPPINGS
|
||||||
|
|
||||||
|
>
|
||||||
|
mode key function
|
||||||
|
<
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
LANG#RUST *SpaceVim-layer-lang-rust*
|
||||||
|
|
||||||
SpaceVim do not load this layer by default, if you are a rust developer, you
|
SpaceVim do not load this layer by default, if you are a rust developer, you
|
||||||
should add `call SpaceVim#layers#load('lang#rust')` to your |SpaceVim-config|
|
should add `call SpaceVim#layers#load('lang#rust')` to your |SpaceVim-config|
|
||||||
@ -491,6 +535,13 @@ mappings:
|
|||||||
normal <leader>gd rust-doc
|
normal <leader>gd rust-doc
|
||||||
<
|
<
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
LANG#XML *SpaceVim-layer-lang-xml*
|
||||||
|
|
||||||
|
when edite an xml file, the omni func is `xmlcomplete#CompleteTags`, you can
|
||||||
|
read the document in `autoload/xmlcomplete.vim` in vim or neovim runtime
|
||||||
|
directory.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
FAQ *SpaceVim-faq*
|
FAQ *SpaceVim-faq*
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user