1
0
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:
wsdjeg 2017-02-01 17:30:37 +08:00
commit 7a3cad01aa
28 changed files with 832 additions and 139 deletions

View File

@ -10,3 +10,10 @@
### Output of the ":message" command, and ":echo SpaceVim#logger#viewLog()"
```log
please post log here:
```

160
README.md
View File

@ -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>
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev)](https://travis-ci.org/SpaceVim/SpaceVim)
![Version 0.1.0-dev](https://img.shields.io/badge/version-0.1.0--dev-yellow.svg?style=flat-square)
@ -15,8 +15,35 @@
![2017-01-07_1363x723](https://cloud.githubusercontent.com/assets/13142418/21739011/6c38c14e-d4ca-11e6-8f3e-2c21dfc489c0.png)
### Table of Contents
- [Introduction](#introduction)
- [Install](#install)
- [Linux/Mac](#linuxmac)
- [Windows support](#windows-support)
- [File Structure](#file-structure)
- Features
- [Neovim centric - Dark powered mode](#neovim-centric---dark-powered-mode-of-spacevim)
- [Modular configuration](#modular-configuration)
- [multiple leader mode](#multiple-leader-mode)
- Lazy-load 90% of plugins with [dein.vim]
- Robust, yet light weight
- [Unite centric work-flow](#unite-centric-work-flow)
- [Awesome ui](#awesome-ui)
- [Language specific mode](#language-specific-mode)
- Extensive Neocomplete setup
- Central location for tags
- Lightweight simple status/tabline
- Premium color-schemes
- Custom configuration
- Support SpaceVim
- contribute to SpaceVim
- Write post about SpaceVim
- Report bugs
#### Introduction
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim,
here we call them layers, each layer has different plugins and config, user just need
here we call them layers, each layer has different plugins and config, users just need
to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim,
please star it on github. It's a great way of getting feedback and gives me the kick to
put more time into development.
@ -30,12 +57,14 @@ For learning about Vim in general, read [vim-galore](https://github.com/mhinz/vi
#### Install
##### Linux/Mac
```sh
curl -sLf https://spacevim.org/install.sh | bash
```
before use SpaceVim, you should install the plugin by `call dein#install()`
installation of neovim/vim with python support:
Installation of neovim/vim with python support:
> [neovim installation](https://github.com/neovim/neovim/wiki/Installing-Neovim)
> [Building Vim from source](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source)
@ -49,8 +78,8 @@ curl -sLf https://spacevim.org/install.sh | bash -s -- -h
##### windows support
- For vim in windows, please just clone this repo as vimfiles in you Home directory.
by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd.
make sure you have backup your own vimfiles.
by default, when open a cmd, the current dir is your Home directory, run this command in cmd.
make sure you have a backup of your own vimfiles.
```sh
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
@ -58,28 +87,13 @@ git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
- For neovim in windows, please clone this repo as `AppData\Local\nvim` in your home directory.
for more info, please check out [neovim's wiki](https://github.com/neovim/neovim/wiki/Installing-Neovim).
by defalut, when open a cmd, the current dir is your Home directory, run this command in cmd.
by default, when open a cmd, the current dir is your Home directory, run this command in cmd.
```sh
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
```
#### Features
- Neovim-centric
- [Modular configuration](#modular-configuration)
- [multiple leader mode](#multiple-leader-mode)
- Lazy-load 90% of plugins with [dein.vim]
- Robust, yet light weight
- [Unite centric work-flow](#unite-centric-work-flow)
- [Awesome ui](#awesome-ui)
- [Language specific mode](#language-specific-mode)
- Extensive Neocomplete setup
- Central location for tags
- Lightweight simple status/tabline
- Premium color-schemes
#### Structure
#### File Structure
- [config](./config)/ - Configuration
- [plugins](./config/plugins)/ - Plugin configurations
- [mappings.vim](./config/mappings.vim) - Key mappings
@ -97,60 +111,76 @@ git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
- [init.vim](./init.vim) - Sources `config/main.vim`
- [vimrc](./vimrc) - Sources `config/main.vim`
#### Modular configuration
#### Features
##### Neovim centric - Dark powered mode of SpaceVim.
By default, SpaceVim use these dark powered plugins:
1. [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) - Dark powered asynchronous completion framework for neovim
2. [dein.vim](https://github.com/Shougo/dein.vim) - Dark powered Vim/Neovim plugin manager
TODO:
1. [defx.nvim](https://github.com/Shougo/defx.nvim) - Dark powered file explorer
2. [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) - Dark powered snippet plugin
3. [denite.nvim](https://github.com/Shougo/denite.nvim) - Dark powered asynchronous unite all interfaces for Neovim/Vim8
##### Modular configuration
- SpaceVim will load custom configuration from `~/.local.vim` and `.local.vim` in current directory.
- SpaceVim support `~/.SpaceVim.d/init.vim` and `./SpaceVim.d/init.vim`.
here is an example:
Here is an example:
```viml
" here are some basic customizations, please refer to the top of the vimrc
" file for all possible options
" Here are some basic customizations, please refer to the top of the vimrc
" file for all possible options:
let g:spacevim_default_indent = 3
let g:spacevim_max_column = 80
let g:spacevim_colorscheme = 'my_awesome_colorscheme'
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
" change the default directory where all miscellaneous persistent files go
" by default it is ~/.cache/vimfiles
" Change the default directory where all miscellaneous persistent files go.
" By default it is ~/.cache/vimfiles.
let g:spacevim_plugin_bundle_dir = "/some/place/else"
" by default, language specific plugins are not loaded. this can be changed
" By default, language specific plugins are not loaded. This can be changed
" with the following:
let g:spacevim_plugin_groups_exclude = ['ruby', 'python']
" if there are groups you want always loaded, you can use this:
" If there are groups you want always loaded, you can use this:
let g:spacevim_plugin_groups_include = ['go']
" alternatively, you can set this variable to load exactly what you want
" Alternatively, you can set this variable to load exactly what you want:
let g:spacevim_plugin_groups = ['core', 'web']
" if there is a particular plugin you don't like, you can define this
" variable to disable them entirely
" If there is a particular plugin you don't like, you can define this
" variable to disable them entirely:
let g:spacevim_disabled_plugins=['vim-foo', 'vim-bar']
" if you want to add some custom plugins, use this options.
" If you want to add some custom plugins, use these options:
let g:spacevim_custom_plugins = [
\ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}],
\ ['wsdjeg/GitHub.vim'],
\ ]
" anything defined here are simply overrides
" Anything defined here are simply overrides
set wildignore+=\*/node_modules/\*
set guifont=Wingdings:h10
```
#### multiple leader mode
##### global origin vim leader, default : `\`
vim's origin global leader can be used in all the mode.
##### local origin vim leader, default : `,`
vim's origin local leader can be used in all the mode.
##### windows function leader, default : `s`
windows function leader can only be used in normal mode.
for the list of mappings see the [link](#window-management)
##### unite work flow leader, default : `f`
unite work flow leader can only be used in normal mode. unite leader need unite groups.
#### Multiple leader mode
##### Global origin vim leader, default : `\`
Vim's origin global leader can be used in all modes.
##### Local origin vim leader, default : `,`
Vim's origin local leader can be used in all the mode.
##### Windows function leader, default : `s`
Windows function leader can only be used in normal mode.
For the list of mappings see the [link](#window-management)
##### Unite work flow leader, default : `f`
Unite work flow leader can only be used in normal mode. Unite leader need unite groups.
#### Unite centric work-flow
- List all the plugins has been installed, fuzzy find what you want,
@ -282,7 +312,7 @@ Name | Description
Name | Description
-------------- | ----------------------
[delimitmate] | Insert mode auto-completion for quotes, parens, brackets
[delimitmate] | Insert mode auto-completion for quotes, parenthesis, brackets
[echodoc] | Print objects' documentation in echo area
[deoplete] | Neovim: Dark powered asynchronous completion framework
[neocomplete] | Next generation completion framework
@ -513,18 +543,16 @@ Key | Mode | Action
`<leader>`+`gd` | Normal | Git diff
`<leader>`+`gc` | Normal | Git commit
`<leader>`+`gb` | Normal | Git blame
`<leader>`+`gB` | Normal | Open in browser
`<leader>`+`gp` | Normal | Git push
##### Plugin: GitGutter
##### Plugin: vim-signify
Key | Mode | Action
----- |:----:| ------------------
`<leader>`+`hj` | Normal | Jump to next hunk
`<leader>`+`hk` | Normal | Jump to previous hunk
`<leader>`+`hs` | Normal | Stage hunk
`<leader>`+`hr` | Normal | Revert hunk
`<leader>`+`hp` | Normal | Preview hunk
`<leader>`+`hj` / `]c` | Normal | Jump to next hunk
`<leader>`+`hk` / `[c` | Normal | Jump to previous hunk
`<leader>`+`hJ` / `]C` | Normal | Jump to last hunk
`<leader>`+`hK` / `[C` | Normal | Jump to first hunk
##### Misc Plugins
@ -538,6 +566,32 @@ Key | Mode | Action
`<leader>`+`W` | Normal | Wiki
`<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>
```
#### Enjoy!
#### Credits & Thanks

View File

@ -2,9 +2,19 @@
" @section Introduction, intro
" @stylized Maktaba
" @library
" @order intro version dicts functions exceptions layers colorscheme layer_lang_java layer_lang_php layer_lang_c
" @order intro version dicts functions exceptions layers faq
" SpaceVim is a Modular configuration, a bundle of custom settings
" and plugins, for Vim. It got inspired by spacemacs.
"
""
" @section CONFIGURATION, config
" SpaceVim use `~/.SpaceVim.d/init.vim` as it's default global config file.
" you can set all the SpaceVim options and layers in it. `~/.SpaceVim.d/` will
" also be added to runtimepath, so you can write your own script in it.
" SpaceVim also support local config of each project. It should be
" `.SpaceVim.d/init.vim` in the root directory of your project. and
" `.SpaceVim.d/` will also be added to runtimepath.
""
" Version of SpaceVim , this value can not be changed.
@ -74,7 +84,7 @@ let g:spacevim_enable_neomake = 1
" <
let g:spacevim_guifont = ''
""
" Enable ycm or not, but default it is 0.
" Disable/Enable YouCompleteMe, by default it is disabled. To enable it:
" >
" let g:spacevim_enable_ycm = 1
" <
@ -107,6 +117,13 @@ let g:spacevim_use_colorscheme = 1
" <
let g:spacevim_vim_help_language = 'en'
""
" Set the message language of vim. By default it is empty, and the language is
" en_US.UTF-8. example:
" >
" let g:spacevim_language = 'en_CA.utf8'
" <
let g:spacevim_language = ''
""
" The colorscheme of SpaceVim, if colorscheme groups are installed.
let g:spacevim_colorscheme = 'gruvbox'
""
@ -300,3 +317,24 @@ function! SpaceVim#welcome() abort
wincmd p
Startify
endfunction
""
" @section FAQ, faq
" 1. How to enable YouCompleteMe? (I do not recommend to use YouCompleteMe, it
" is too big as a vim plugin, BTW I do not like using submodule in vim plugin,
" it is hard to manager by vim plugin manager.)
"
" >
" step 1: add `let g:spacevim_enable_ycm = 1` to custom_config, by default it
" should be `~/.SpaceVim.d/init.vim`.
"
" step 2: Get into the directory of YouCompleteMe's author, by default it
" should be `~/.cache/vimfiles/repos/github.com/Valloric/`, If you find the
" directory `YouCompleteMe` in it, just get into it, otherwise clone
" YouCompleteMe repo by
" `git clone https://github.com/Valloric/YouCompleteMe.git`, after cloning,
" get into it, run `git submodule update --init --recursive`.
"
" step 3: compile YouCompleteMe with the feature you want. if you just want
" support c family, you need run `./install.py --clang-completer`.
" <

View File

@ -44,6 +44,9 @@ function! SpaceVim#default#SetOptions() abort
set softtabstop=4
set shiftwidth=4
" autoread
set autoread
" backup
set backup
set undofile
@ -178,6 +181,8 @@ function! SpaceVim#default#SetMappings() abort
exe 'tnoremap <silent><C-Left> <C-\><C-n>:<C-u>wincmd h<CR>'
exe 'tnoremap <silent><C-Up> <C-\><C-n>:<C-u>wincmd k<CR>'
exe 'tnoremap <silent><C-Down> <C-\><C-n>:<C-u>wincmd j<CR>'
exe 'tnoremap <silent><M-Left> <C-\><C-n>:<C-u>bprev<CR>'
exe 'tnoremap <silent><M-Right> <C-\><C-n>:<C-u>bnext<CR>'
exe 'tnoremap <silent><esc> <C-\><C-n>'
endif
@ -360,6 +365,7 @@ function! SpaceVim#default#SetMappings() abort
call SpaceVim#mapping#def('nnoremap <silent>', '<Leader>sg', ':vsplit<CR>:wincmd p<CR>:e#<CR>',
\'Open previous buffer in vsplit window' , 'vsplit|wincmd p|e#')
call SpaceVim#mapping#def('nnoremap <silent>', 'gf', ':call zvim#gf()<CR>', 'Jump to a file under cursor', '')
call SpaceVim#mapping#def('nnoremap <silent>', 'gd', ':call SpaceVim#mapping#gd()<CR>', 'Goto declaration', '')
endfunction
fu! s:tobur(num) abort

View File

@ -1,18 +1,36 @@
""
" @section autocomplete, autocomplete
" @parentsection layers
" @subsection code completion
" SpaceVim use neocomplete as default completion engine for vim with lua
" support, if has no lua support neocomplcache will be the completion engine.
" SpaceVim use deoplete as default completion engine for nevoim. to make
" neovim support python, please read neovim's |provider-python|.
"
" SpaceVim include YouCompleteMe, but it is disabled by default, to enable
" ycm, see |g:spacevim_enable_ycm|.
"
" @subsection snippet
" SpaceVim use neosnippet as default snippet engine, and the default snippets
" is `Shougo/neosnippet-snippets`. for more information, please read
" |neosnippet|.
function! SpaceVim#layers#autocomplete#plugins() abort
let plugins = [
\ ['honza/vim-snippets', {'on_i' : 1, 'loadconf_before' : 1}],
\ ['Shougo/neco-syntax', { 'on_i' : 1}],
\ ['ujihisa/neco-look', { 'on_i' : 1}],
\ ['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}],
\ ['Shougo/context_filetype.vim', { 'on_i' : 1}],
\ ['Shougo/neoinclude.vim', { 'on_i' : 1}],
\ ['Shougo/neosnippet-snippets', { 'merged' : 0}],
\ ['Shougo/neopairs.vim', { 'on_i' : 1}],
\ ]
if g:spacevim_autocomplete_method ==# 'ycm'
call add(plugins, ['SirVer/ultisnips', {'loadconf_before' : 1}])
call add(plugins, ['ervandew/supertab', {'loadconf_before' : 1}])
call add(plugins, ['Valloric/YouCompleteMe', {'loadconf_before' : 1}])
call add(plugins, ['SirVer/ultisnips', {'loadconf_before' : 1, 'merged' : 0}])
call add(plugins, ['ervandew/supertab', {'loadconf_before' : 1, 'merged' : 0}])
call add(plugins, ['Valloric/YouCompleteMe', {'loadconf_before' : 1, 'merged' : 0}])
elseif g:spacevim_autocomplete_method ==# 'neocomplete' "{{{
call add(plugins, ['Shougo/neocomplete', {
\ 'on_i' : 1,

View File

@ -1,10 +1,132 @@
""
" @section Colorscheme, colorscheme
" gruvbox : this is SpaceVim default colorscheme. SpaceVim also support there
" colorschemes:
" @section colorscheme, colorscheme
" @parentsection layers
" SpaceVim default colorscheme is gruvbox, you can change it by set spacevim
" option. add this to your `~/.SpaceVim.d/init.vim`
" >
" let g:spacevim_colorscheme = 'solarized'
" <
"
" colorschemes: if the colorscheme you want do not list below, PR welcome.
" >
" gruvbox
" hybrid-material
" solarized
" zellner
" yowish
" wombat256mod
" twilight256
" torte
" solarized
" slate
" shine
" seoul256-light
" seoul256
" scheakur
" ron
" rdark-terminal2
" pyte
" peachpuff
" parsec
" pablo
" onedark
" murphy
" morning
" molokayo
" molokai
" lucius
" lightning
" koehler
" jellybeans
" janah
" industry
" hybrid_reverse
" hybrid_material
" hybrid
" gruvbox
" focuspoint
" flattened_light
" flattened_dark
" flatcolor
" evening
" elflord
" desert
" delek
" default
" darkblue
" blue
" base16-woodland
" base16-unikitty-light
" base16-unikitty-dark
" base16-twilight
" base16-tomorrow-night
" base16-tomorrow
" base16-summerfruit-light
" base16-summerfruit-dark
" base16-spacemacs
" base16-solarized-light
" base16-solarized-dark
" base16-solar-flare
" base16-shapeshifter
" base16-seti-ui
" base16-railscasts
" base16-pop
" base16-pico
" base16-phd
" base16-paraiso
" base16-onedark
" base16-oceanicnext
" base16-ocean
" base16-monokai
" base16-mocha
" base16-mexico-light
" base16-materia
" base16-marrakesh
" base16-macintosh
" base16-london-tube
" base16-isotope
" base16-ir-black
" base16-hopscotch
" base16-harmonic16-light
" base16-harmonic16-dark
" base16-green-screen
" base16-grayscale-light
" base16-grayscale-dark
" base16-google-light
" base16-google-dark
" base16-github
" base16-flat
" base16-embers
" base16-eighties
" base16-dracula
" base16-default-light
" base16-default-dark
" base16-darktooth
" base16-cupcake
" base16-codeschool
" base16-chalk
" base16-bright
" base16-brewer
" base16-bespin
" base16-atelier-sulphurpool
" base16-atelier-seaside
" base16-atelier-savanna
" base16-atelier-plateau
" base16-atelier-lakeside
" base16-atelier-heath
" base16-atelier-forest
" base16-atelier-estuary
" base16-atelier-dune
" base16-atelier-cave
" base16-ashes
" base16-apathy
" base16-3024
" atom
" apprentice
" anderson
" PaperColor
" OceanicNextLight
" OceanicNext
" <

View File

@ -10,5 +10,17 @@ endfunction
function! SpaceVim#layers#git#config() abort
nnoremap <silent> <Leader>gs :Gita status<CR>
nnoremap <silent> <Leader>gd :Gita diff<CR>
nnoremap <silent> <Leader>gc :Gita commit<CR>
nnoremap <silent> <Leader>gb :Gita blame<CR>
nnoremap <silent> <Leader>gp :Gita push<CR>
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

View File

@ -10,7 +10,6 @@ function! SpaceVim#layers#lang#plugins() abort
\ ['wavded/vim-stylus', { 'on_ft' : ['styl']}],
\ ['digitaltoad/vim-jade', { 'on_ft' : ['jade']}],
\ ['juvenn/mustache.vim', { 'on_ft' : ['mustache']}],
\ ['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}],
\ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}],
\ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}],
\ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}],
@ -19,13 +18,11 @@ function! SpaceVim#layers#lang#plugins() abort
\ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}],
\ ['plasticboy/vim-markdown', { 'on_ft' : 'markdown'}],
\ ['elixir-lang/vim-elixir', { 'on_ft' : 'elixir'}],
\ ['racer-rust/vim-racer', { 'on_ft' : 'rust'}],
\ ['PotatoesMaster/i3-vim-syntax', { 'on_ft' : 'i3'}],
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
\ ['lervag/vimtex', { 'on_ft' : 'tex'}],
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
\ ['voxpupuli/vim-puppet', {'on_ft' : 'puppet'}],
\ ['rust-lang/rust.vim', {'merged' : 1}],
\ ]
" python
if has('nvim')
@ -37,7 +34,6 @@ function! SpaceVim#layers#lang#plugins() abort
endfunction
function! SpaceVim#layers#lang#config() abort
let g:racer_cmd = $HOME.'/.cargo/bin/racer'
let g:vim_markdown_conceal = 0
let g:vim_markdown_folding_disabled = 1
endfunction

View File

@ -1,12 +1,41 @@
""
" @section Layer_lang_c
" lang#c :
" @section lang#c, layer-lang-c
" @parentsection layers
" this layer provide c family language code completion and syntax chaeck.you
" need install clang.
"
" this layer provide c family language code completion.
" configuration:
"
" requirement:
" clang
" libclang
" 1.setting compile flag:
" >
" let g:deoplete#sources#clang#flags = ['-Iwhatever', ...]
" <
" 2.`g:deoplete#sources#clang#executable` sets the path to the clang
" executable.
"
" 3.`g:deoplete#sources#clang#autofill_neomake` is a boolean that tells this
" plugin to fill in the `g:neomake_<filetype>_clang_maker` variable with the
" clang executable path and flags. You will still need to enable it with
" `g:neomake_<filetype>_enabled_make=['clang']`.
"
" 4.`g:deoplete#sources#clang#std` is a dict containing the standards you want
" to use. It's not used if you already have `-std=whatever` in your flags. The
" defaults are:
" >
" {
" 'c': 'c11',
" 'cpp': 'c++1z',
" 'objc': 'c11',
" 'objcpp': 'c++1z',
" }
" <
" 5.`g:deoplete#sources#clang#preproc_max_lines` sets the
" maximum number of lines to search for a #ifdef or #endif
" line. #ifdef lines are discarded to get completions within
" conditional preprocessor blocks. The default is 50, setting it to 0 disables this feature.
"
function! SpaceVim#layers#lang#c#plugins() abort
let plugins = []
@ -19,5 +48,5 @@ function! SpaceVim#layers#lang#c#plugins() abort
endfunction
function! SpaceVim#layers#lang#c#config() abort
endfunction

View File

@ -1,3 +1,22 @@
""
" @section lang#go, layer-lang-go
" @parentsection layers
" This layer support go development, include code completion and syntax check.
" @subsection mappings
" >
" mode key function
" normal <leader>gi go implements
" normal <leader>gf go info
" normal <leader>ge go rename
" normal <leader>gr go run
" normal <leader>gb go build
" normal <leader>gt go test
" normal <leader>gd go doc
" normal <leader>gv go doc vertical
" normal <leader>gco go coverage
" <
function! SpaceVim#layers#lang#go#plugins() abort
let plugins = [['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}]]
if has('nvim')
@ -16,16 +35,18 @@ function! SpaceVim#layers#lang#go#config() abort
let g:go_fmt_command = 'goimports'
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
let g:go_snippet_engine = 'neosnippet'
augroup SpaceVim_go
au!
au FileType go nmap <Buffer><Leader>s <Plug>(go-implements)
au FileType go nmap <Buffer><Leader>i <Plug>(go-info)
au FileType go nmap <Buffer><Leader>e <Plug>(go-rename)
au FileType go nmap <Buffer><Leader>r <Plug>(go-run)
au FileType go nmap <Buffer><Leader>b <Plug>(go-build)
au FileType go nmap <Buffer><Leader>t <Plug>(go-test)
au FileType go nmap <Buffer><Leader>gd <Plug>(go-doc)
au FileType go nmap <Buffer><Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Buffer><Leader>co <Plug>(go-coverage)
au FileType go nmap <Buffer><silent><Leader>s <Plug>(go-implements)
au FileType go nmap <Buffer><silent><Leader>i <Plug>(go-info)
au FileType go nmap <Buffer><silent><Leader>e <Plug>(go-rename)
au FileType go nmap <Buffer><silent><Leader>r <Plug>(go-run)
au FileType go nmap <Buffer><silent><Leader>b <Plug>(go-build)
au FileType go nmap <Buffer><silent><Leader>t <Plug>(go-test)
au FileType go nmap <Buffer><silent><Leader>gd <Plug>(go-doc)
au FileType go nmap <Buffer><silent><Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Buffer><silent><Leader>co <Plug>(go-coverage)
augroup END
endfunction

View File

@ -1,5 +1,6 @@
""
" @section Layer_lang_java, layer_lang_java
" @section lang#java, layer-lang-java
" @parentsection layers
" This layer is for java development.
" >
" import-mappings:

View File

@ -6,9 +6,12 @@ function! SpaceVim#layers#lang#lua#plugins() abort
" Improved Lua 5.3 syntax and indentation support for Vim
call add(plugins, ['tbastos/vim-lua', {'on_ft' : 'lua'}])
call add(plugins, ['WolfgangMehner/lua-support', {'on_ft' : 'lua'}])
call add(plugins, ['SpaceVim/vim-luacomplete', {'on_ft' : 'lua'}])
return plugins
endfunction
function! SpaceVim#layers#lang#lua#config() abort
augroup spacevim_lua
autocmd FileType lua setlocal omnifunc=luacomplete#complete
augroup END
endfunction

View File

@ -1,6 +1,7 @@
function! SpaceVim#layers#lang#perl#plugins() abort
let plugins = []
call add(plugins, ['WolfgangMehner/perl-support', {'on_ft' : 'perl'}])
call add(plugins, ['c9s/perlomni.vim', {'on_ft' : 'perl'}])
return plugins
endfunction

View File

@ -1,20 +1,16 @@
""
" @section Layer_lang_php
" lang#php :
"
" this layer is for php development, and it provide auto codo completion,
" @section lang#php, layer-lang-php
" @parentsection layers
" this layer is for php development, and it provide auto codo completion,
" and syntax check, and jump to the definition location.
"
" requirement:
"
" PHP 5.3+
"
" PCNTL Extension
"
" Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
"
" Composer Project
"
" requirement:
" >
" PHP 5.3+
" PCNTL Extension
" Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
" Composer Project
" <

View File

@ -0,0 +1,44 @@
""
" @section lang#rust, layer-lang-rust
" @parentsection layers
" SpaceVim do not load this layer by default, if you are a rust developer, you
" should add `call SpaceVim#layers#load('lang#rust')` to your @section(config)
"
" requirement:
" 1. racer : cargo install racer
" 2. export RUST_SRC_PATH :
" you can download src by : rustup component add rust-src, and add below
" into your bashrc.
"
" export RUST_SRC_PATH=~/.multirust/toolchains/[your-toolchain]/lib/rustlib/src/rust/src
"
" configuration:
" 1. add `let g:racer_cmd = "/path/to/racer/bin"` in to custom config, if
" you has racer executable in you PATH. g:racer_cmd should be auto detect.
"
" mappings:
" >
" mode key function
" normal gd rust-definition
" normal gs rust-definition-split
" normal gx rust-definition-vertical
" normal <leader>gd rust-doc
" <
function! SpaceVim#layers#lang#rust#plugins() abort
let plugins = []
call add(plugins, ['racer-rust/vim-racer', { 'on_ft' : 'rust'}])
call add(plugins, ['rust-lang/rust.vim', {'merged' : 1}])
return plugins
endfunction
function! SpaceVim#layers#lang#rust#config() abort
let g:racer_experimental_completer = 1
let g:racer_cmd = $HOME.'/.cargo/bin/racer'
augroup spacevim_layer_lang_rust
au FileType rust nmap <buffer><silent> gd <Plug>(rust-def)
au FileType rust nmap <buffer><silent> gs <Plug>(rust-def-split)
au FileType rust nmap <buffer><silent> gx <Plug>(rust-def-vertical)
au FileType rust nmap <buffer><silent> <leader>gd <Plug>(rust-doc)
augroup END
endfunction

View 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

View File

@ -0,0 +1,19 @@
""
" @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']}])
call add(plugins,['alvan/vim-closetag', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}])
return plugins
endfunction
function! SpaceVim#layers#lang#xml#config() abort
endfunction

View File

@ -6,7 +6,6 @@ function! SpaceVim#layers#tools#plugins() abort
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}],
\ ['Yggdroot/LeaderF', {'merged' : 0}],
\ ['google/vim-searchindex'],
\ ['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}],
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
\ ['mhinz/vim-grepper' , { 'on_cmd' : 'Grepper', 'loadconf' : 1} ],

View File

@ -1,6 +1,7 @@
let s:logger_level = g:spacevim_debug_level
let s:levels = ['Info', 'Warn', 'Error']
let s:logger_file = expand('~/.SpaceVim/.SpaceVim.log')
let s:log_temp = []
""
" @public
@ -18,18 +19,24 @@ endfunction
function! SpaceVim#logger#info(msg) abort
if g:spacevim_enable_debug && s:logger_level <= 1
call s:wite(s:warpMsg(a:msg, 1))
else
call add(s:log_temp,s:warpMsg(a:msg,1))
endif
endfunction
function! SpaceVim#logger#warn(msg) abort
if g:spacevim_enable_debug && s:logger_level <= 2
call s:wite(s:warpMsg(a:msg, 2))
else
call add(s:log_temp,s:warpMsg(a:msg,2))
endif
endfunction
function! SpaceVim#logger#error(msg) abort
if g:spacevim_enable_debug && s:logger_level <= 3
call s:wite(s:warpMsg(a:msg, 3))
else
call add(s:log_temp,s:warpMsg(a:msg,3))
endif
endfunction
@ -40,12 +47,18 @@ endfunction
function! SpaceVim#logger#viewLog(...) abort
let info = "SpaceVim Options :\n\n"
let info .= join(SpaceVim#options#list(), "\n")
let info .= "\n"
let l = a:0 > 0 ? a:1 : 1
if filereadable(s:logger_file)
let logs = readfile(s:logger_file, '')
return join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n")
return info . join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n")
else
return '[ SpaceVim ] : logger file ' . s:logger_file . ' does not exists!'
let info .= '[ SpaceVim ] : logger file ' . s:logger_file . ' does not exists, only log for current process will be shown!'
let info .= join(filter(s:log_temp, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n")
return info
endif
endfunction

View File

@ -56,3 +56,11 @@ function! SpaceVim#mapping#enter() abort
return "\<Enter>"
endif
endfunction
function! SpaceVim#mapping#gd() abort
if !empty(SpaceVim#mapping#gd#get())
call call(SpaceVim#mapping#gd#get(), [])
else
normal! gd
endif
endfunction

View 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

View File

@ -0,0 +1,25 @@
function! SpaceVim#options#list() abort
let list = []
if has('patch-7.4.2010') && 0
for var in getcompletion('g:spacevim_','var')
call add(list, var . ' = ' . string(get(g:, var[2:] , '')))
endfor
else
redraw
for var in filter(map(s:execute('let g:'), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'")
call add(list,'g:' . var . ' = ' . string(get(g:, var , '')))
endfor
endif
return list
endfunction
function! s:execute(cmd) abort
if exists('*execute')
return split(execute(a:cmd), "\n")
endif
redir => output
execute a:cmd
redir END
return split(output, "\n")
endfunction

View File

@ -17,7 +17,7 @@ command! -range=% REPLSendSelection call REPLSend(s:GetVisual())
command! REPLSendLine call REPLSend([getline('.')])
" }}}
"let $NVIM_TUI_ENABLE_TRUE_COLOR=1
"let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=2
"silent! let &t_SI = "\<Esc>]50;CursorShape=1\x7"
"silent! let &t_SR = "\<Esc>]50;CursorShape=2\x7"
"silent! let &t_EI = "\<Esc>]50;CursorShape=0\x7"
@ -55,7 +55,7 @@ let g:terminal_color_15 = "#ebdbb2"
augroup Terminal
au!
au TermOpen * let g:last_terminal_job_id = b:terminal_job_id | IndentLinesDisable
au WinEnter term://* startinsert | IndentLinesDisable
au BufWinEnter term://* startinsert | IndentLinesDisable
"au TermClose * exec &buftype == 'terminal' ? 'bd!' : ''
au TermClose * exe expand('<abuf>').'bd!'
augroup END

View File

@ -11,16 +11,25 @@ let g:deoplete#omni#input_patterns.java = [
\'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*',
\]
let g:deoplete#omni#input_patterns.perl = [
\'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*',
\]
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
let g:deoplete#omni_patterns.php = '->\|::'
let g:deoplete#omni_patterns.lua = '.'
let g:deoplete#ignore_sources = {}
let g:deoplete#ignore_sources.go = ['omni']
let g:deoplete#ignore_sources.c = ['omni']
let g:deoplete#ignore_sources.rust = ['omni']
let g:deoplete#ignore_sources.perl = ['omni']
call deoplete#custom#set('go', 'mark', '')
call deoplete#custom#set('clang2', 'mark', '')
call deoplete#custom#set('racer', 'mark', '')
if g:spacevim_enable_javacomplete2_py
let g:deoplete#ignore_sources.java = ['omni']
call deoplete#custom#set('javacomplete2', 'mark', '')

View File

@ -37,6 +37,7 @@ endif
let g:neocomplete#sources#omni#input_patterns.perl = '\h\w*->\h\w*\|\h\w*::'
let g:neocomplete#sources#omni#input_patterns.java ='[^. \t0-9]\.\w*'
let g:neocomplete#sources#omni#input_patterns.lua ='[^. \t0-9]\.\w*'
let g:neocomplete#force_omni_input_patterns = {}
"let g:neocomplete#force_omni_input_patterns.java = '^\s*'
" <C-h>, <BS>: close popup and delete backword char.

View File

@ -1,8 +1,8 @@
nnoremap <leader>gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('<cword>')<CR>
nnoremap <leader>gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context'<CR>
"nnoremap <leader>gd :execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.expand('<cword>')<CR>
"nnoremap <leader>gc :execute 'Unite -auto-preview -start-insert -no-split gtags/context'<CR>
nnoremap <leader>gr :execute 'Unite -auto-preview -start-insert -no-split gtags/ref'<CR>
nnoremap <leader>gg :execute 'Unite -auto-preview -start-insert -no-split gtags/grep'<CR>
nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR>
"nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR>
vnoremap <leader>gd <ESC>:execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.GetVisualSelection()<CR>
let g:unite_source_gtags_project_config = {
\ '_': { 'treelize': 0 }

View File

@ -48,8 +48,3 @@ if get(g:, 'airline_powerline_fonts', 0)
let g:airline_symbols.maxlinenr= ''
endif
augroup Fix_airline_with_unite
autocmd FileType unite AirlineRefresh
autocmd FileType vimfiler AirlineRefresh
augroup END

View File

@ -4,13 +4,18 @@ wsdjeg *Maktaba* *SpaceVim*
==============================================================================
CONTENTS *SpaceVim-contents*
1. Introduction.............................................|SpaceVim-intro|
2. Configuration...........................................|SpaceVim-config|
2. CONFIGURATION...........................................|SpaceVim-config|
3. Functions............................................|SpaceVim-functions|
4. Layers..................................................|SpaceVim-layers|
5. Colorscheme........................................|SpaceVim-colorscheme|
6. Layer_lang_java................................|SpaceVim-layer_lang_java|
7. Layer_lang_php..................................|SpaceVim-layer_lang_php|
8. Layer_lang_c......................................|SpaceVim-layer_lang_c|
1. autocomplete..................................|SpaceVim-autocomplete|
2. colorscheme....................................|SpaceVim-colorscheme|
3. lang#c........................................|SpaceVim-layer-lang-c|
4. lang#go......................................|SpaceVim-layer-lang-go|
5. lang#java..................................|SpaceVim-layer-lang-java|
6. lang#php....................................|SpaceVim-layer-lang-php|
7. lang#rust..................................|SpaceVim-layer-lang-rust|
8. lang#xml....................................|SpaceVim-layer-lang-xml|
5. FAQ........................................................|SpaceVim-faq|
==============================================================================
INTRODUCTION *SpaceVim-intro*
@ -18,9 +23,17 @@ INTRODUCTION *SpaceVim-intro*
SpaceVim is a Modular configuration, a bundle of custom settings and
plugins, for Vim. It got inspired by spacemacs.
==============================================================================
CONFIGURATION *SpaceVim-config*
SpaceVim use `~/.SpaceVim.d/init.vim` as it's default global config file. you
can set all the SpaceVim options and layers in it. `~/.SpaceVim.d/` will also
be added to runtimepath, so you can write your own script in it. SpaceVim also
support local config of each project. It should be `.SpaceVim.d/init.vim` in
the root directory of your project. and `.SpaceVim.d/` will also be added to
runtimepath.
*g:spacevim_default_indent*
Change the default indent of SpaceVim. default is 2.
>
@ -78,7 +91,7 @@ set the guifont of Spacevim, default is empty.
<
*g:spacevim_enable_ycm*
Enable ycm or not, but default it is 0.
Disable/Enable YouCompleteMe, by default it is disabled. To enable it:
>
let g:spacevim_enable_ycm = 1
<
@ -108,6 +121,13 @@ chinese.
let g:spacevim_vim_help_language = 'chinese'
<
*g:spacevim_language*
Set the message language of vim. By default it is empty, and the language is
en_US.UTF-8. example:
>
let g:spacevim_language = 'en_CA.utf8'
<
*g:spacevim_colorscheme*
The colorscheme of SpaceVim, if colorscheme groups are installed.
@ -223,18 +243,211 @@ LAYERS *SpaceVim-layers*
SpaceVim support such layers:
==============================================================================
AUTOCOMPLETE *SpaceVim-autocomplete*
CODE COMPLETION
SpaceVim use neocomplete as default completion engine for vim with lua
support, if has no lua support neocomplcache will be the completion engine.
SpaceVim use deoplete as default completion engine for nevoim. to make neovim
support python, please read neovim's |provider-python|.
SpaceVim include YouCompleteMe, but it is disabled by default, to enable ycm,
see |g:spacevim_enable_ycm|.
SNIPPET
SpaceVim use neosnippet as default snippet engine, and the default snippets is
`Shougo/neosnippet-snippets`. for more information, please read |neosnippet|.
==============================================================================
COLORSCHEME *SpaceVim-colorscheme*
gruvbox : this is SpaceVim default colorscheme. SpaceVim also support there
colorschemes:
SpaceVim default colorscheme is gruvbox, you can change it by set spacevim
option. add this to your `~/.SpaceVim.d/init.vim`
>
let g:spacevim_colorscheme = 'solarized'
<
colorschemes: if the colorscheme you want do not list below, PR welcome.
>
gruvbox
hybrid-material
solarized
zellner
yowish
wombat256mod
twilight256
torte
solarized
slate
shine
seoul256-light
seoul256
scheakur
ron
rdark-terminal2
pyte
peachpuff
parsec
pablo
onedark
murphy
morning
molokayo
molokai
lucius
lightning
koehler
jellybeans
janah
industry
hybrid_reverse
hybrid_material
hybrid
gruvbox
focuspoint
flattened_light
flattened_dark
flatcolor
evening
elflord
desert
delek
default
darkblue
blue
base16-woodland
base16-unikitty-light
base16-unikitty-dark
base16-twilight
base16-tomorrow-night
base16-tomorrow
base16-summerfruit-light
base16-summerfruit-dark
base16-spacemacs
base16-solarized-light
base16-solarized-dark
base16-solar-flare
base16-shapeshifter
base16-seti-ui
base16-railscasts
base16-pop
base16-pico
base16-phd
base16-paraiso
base16-onedark
base16-oceanicnext
base16-ocean
base16-monokai
base16-mocha
base16-mexico-light
base16-materia
base16-marrakesh
base16-macintosh
base16-london-tube
base16-isotope
base16-ir-black
base16-hopscotch
base16-harmonic16-light
base16-harmonic16-dark
base16-green-screen
base16-grayscale-light
base16-grayscale-dark
base16-google-light
base16-google-dark
base16-github
base16-flat
base16-embers
base16-eighties
base16-dracula
base16-default-light
base16-default-dark
base16-darktooth
base16-cupcake
base16-codeschool
base16-chalk
base16-bright
base16-brewer
base16-bespin
base16-atelier-sulphurpool
base16-atelier-seaside
base16-atelier-savanna
base16-atelier-plateau
base16-atelier-lakeside
base16-atelier-heath
base16-atelier-forest
base16-atelier-estuary
base16-atelier-dune
base16-atelier-cave
base16-ashes
base16-apathy
base16-3024
atom
apprentice
anderson
PaperColor
OceanicNextLight
OceanicNext
<
==============================================================================
LAYER_LANG_JAVA *SpaceVim-layer_lang_java*
LANG#C *SpaceVim-layer-lang-c*
this layer provide c family language code completion and syntax chaeck.you
need install clang.
configuration:
1.setting compile flag:
>
let g:deoplete#sources#clang#flags = ['-Iwhatever', ...]
<
2.`g:deoplete#sources#clang#executable` sets the path to the clang
executable.
3.`g:deoplete#sources#clang#autofill_neomake` is a boolean that tells this
plugin to fill in the `g:neomake_<filetype>_clang_maker` variable with the
clang executable path and flags. You will still need to enable it with
`g:neomake_<filetype>_enabled_make=['clang']`.
4.`g:deoplete#sources#clang#std` is a dict containing the standards you want
to use. It's not used if you already have `-std=whatever` in your flags. The
defaults are:
>
{
'c': 'c11',
'cpp': 'c++1z',
'objc': 'c11',
'objcpp': 'c++1z',
}
<
5.`g:deoplete#sources#clang#preproc_max_lines` sets the maximum number of
lines to search for a #ifdef or #endif line. #ifdef lines are discarded to
get completions within conditional preprocessor blocks. The default is 50,
setting it to 0 disables this feature.
==============================================================================
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.
>
@ -271,32 +484,75 @@ This layer is for java development.
==============================================================================
LAYER_LANG_PHP *SpaceVim-layer_lang_php*
LANG#PHP *SpaceVim-layer-lang-php*
lang#php :
this layer is for php development, and it provide auto codo completion, and
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
requirement:
>
PHP 5.3+
PCNTL Extension
Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
Composer Project
<
==============================================================================
LAYER_LANG_C *SpaceVim-layer_lang_c*
LANG#RUST *SpaceVim-layer-lang-rust*
lang#c :
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|
this layer provide c family language code completion.
requirement:
1. racer : cargo install racer
2. export RUST_SRC_PATH : you can download src by : rustup component add
rust-src, and add below into your bashrc.
requirement: clang libclang
export RUST_SRC_PATH=~/.multirust/toolchains/[your-toolchain]/lib/rustlib/src/
rust/src
configuration:
1. add `let g:racer_cmd = "/path/to/racer/bin"` in to custom config, if you
has racer executable in you PATH. g:racer_cmd should be auto detect.
mappings:
>
mode key function
normal gd rust-definition
normal gs rust-definition-split
normal gx rust-definition-vertical
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*
1. How to enable YouCompleteMe? (I do not recommend to use YouCompleteMe, it
is too big as a vim plugin, BTW I do not like using submodule in vim plugin,
it is hard to manager by vim plugin manager.)
>
step 1: add `let g:spacevim_enable_ycm = 1` to custom_config, by default it
should be `~/.SpaceVim.d/init.vim`.
step 2: Get into the directory of YouCompleteMe's author, by default it
should be `~/.cache/vimfiles/repos/github.com/Valloric/`, If you find the
directory `YouCompleteMe` in it, just get into it, otherwise clone
YouCompleteMe repo by
`git clone https://github.com/Valloric/YouCompleteMe.git`, after cloning,
get into it, run `git submodule update --init --recursive`.
step 3: compile YouCompleteMe with the feature you want. if you just want
support c family, you need run `./install.py --clang-completer`.
<
vim:tw=78:ts=8:ft=help:norl: