mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 20:20:05 +08:00
Merge branch 'update_doc' into dev
This commit is contained in:
commit
083701ef0f
@ -2,7 +2,7 @@
|
||||
" @section Introduction, intro
|
||||
" @stylized Maktaba
|
||||
" @library
|
||||
" @order intro version dicts functions exceptions layers
|
||||
" @order intro version dicts functions exceptions layers layer-lang-php layer-lang-c
|
||||
" SpaceVim is a Modular configuration, a bundle of custom settings
|
||||
" and plugins, for Vim. It got inspired by spacemacs.
|
||||
|
||||
@ -87,10 +87,24 @@ let g:spacevim_enable_neocomplcache = 0
|
||||
" <
|
||||
let g:spacevim_enable_cursorline = 0
|
||||
""
|
||||
" The error symbol used by maker.
|
||||
" Set the error symbol of SpaceVim's syntax maker.
|
||||
" example: >
|
||||
" let g:spacevim_error_symbol = '+'
|
||||
" <
|
||||
let g:spacevim_error_symbol = '✖'
|
||||
""
|
||||
" Set the warning symbol of SpaceVim's syntax maker.
|
||||
" example: >
|
||||
" let g:spacevim_warning_symbol = '!'
|
||||
" <
|
||||
let g:spacevim_warning_symbol = '⚠'
|
||||
let g:spacevim_use_colorscheme = 1
|
||||
""
|
||||
" Set the help language of vim. By default it is `en`, you can change it to
|
||||
" chinese.
|
||||
" >
|
||||
" let g:spacevim_vim_help_language = 'chinese'
|
||||
" <
|
||||
let g:spacevim_vim_help_language = 'en'
|
||||
""
|
||||
" The colorscheme of SpaceVim, if colorscheme groups are installed.
|
||||
|
@ -9,7 +9,6 @@ function! SpaceVim#autocmds#init() abort
|
||||
\ q | endif
|
||||
autocmd FileType jsp call JspFileTypeInit()
|
||||
autocmd FileType html,css,jsp EmmetInstall
|
||||
autocmd FileType java call JavaFileTypeInit()
|
||||
autocmd BufRead,BufNewFile *.pp setfiletype puppet
|
||||
autocmd BufEnter,WinEnter,InsertLeave * set cursorline
|
||||
autocmd BufLeave,WinLeave,InsertEnter * set nocursorline
|
||||
@ -37,7 +36,7 @@ function! SpaceVim#autocmds#init() abort
|
||||
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
|
||||
autocmd FileType php setlocal omnifunc=phpcomplete_extended#CompletePHP
|
||||
autocmd BufEnter *
|
||||
\ if empty(&buftype)&&has('nvim')
|
||||
\ if empty(&buftype) && has('nvim') && &filetype != 'help'
|
||||
\| nnoremap <silent><buffer> <C-]> :call MyTagfunc()<CR>
|
||||
\| nnoremap <silent><buffer> <C-[> :call MyTagfuncBack()<CR>
|
||||
\| else
|
||||
|
@ -1,3 +1,5 @@
|
||||
""
|
||||
" @section Layer-lang-c
|
||||
" lang#c :
|
||||
"
|
||||
" this layer provide c family language code completion.
|
||||
|
@ -4,15 +4,55 @@ function! SpaceVim#layers#lang#java#plugins() abort
|
||||
\ ['wsdjeg/java_getset.vim', { 'on_ft' : 'java', 'loadconf' : 1}],
|
||||
\ ['wsdjeg/JavaUnit.vim', { 'on_ft' : 'java'}],
|
||||
\ ['vim-jp/vim-java', { 'on_ft' : 'java'}],
|
||||
\ ['artur-shaik/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}],
|
||||
\ ]
|
||||
if g:spacevim_enable_javacomplete2_py
|
||||
call add(plugins , ['wsdjeg/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}])
|
||||
else
|
||||
call add(plugins , ['artur-shaik/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}])
|
||||
endif
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#java#config() abort
|
||||
|
||||
function! s:java_mappings() abort
|
||||
inoremap <silent> <buffer> <leader>UU <esc>bgUwea
|
||||
inoremap <silent> <buffer> <leader>uu <esc>bguwea
|
||||
inoremap <silent> <buffer> <leader>ua <esc>bgulea
|
||||
inoremap <silent> <buffer> <leader>Ua <esc>bgUlea
|
||||
nmap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
imap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
nmap <silent><buffer> <leader>jI <Plug>(JavaComplete-Imports-AddMissing)
|
||||
nmap <silent><buffer> <leader>jR <Plug>(JavaComplete-Imports-RemoveUnused)
|
||||
nmap <silent><buffer> <leader>ji <Plug>(JavaComplete-Imports-AddSmart)
|
||||
nmap <silent><buffer> <leader>jii <Plug>(JavaComplete-Imports-Add)
|
||||
|
||||
imap <silent><buffer> <C-j>I <Plug>(JavaComplete-Imports-AddMissing)
|
||||
imap <silent><buffer> <C-j>R <Plug>(JavaComplete-Imports-RemoveUnused)
|
||||
imap <silent><buffer> <C-j>i <Plug>(JavaComplete-Imports-AddSmart)
|
||||
imap <silent><buffer> <C-j>ii <Plug>(JavaComplete-Imports-Add)
|
||||
|
||||
nmap <silent><buffer> <leader>jM <Plug>(JavaComplete-Generate-AbstractMethods)
|
||||
|
||||
imap <silent><buffer> <C-j>jM <Plug>(JavaComplete-Generate-AbstractMethods)
|
||||
|
||||
nmap <silent><buffer> <leader>jA <Plug>(JavaComplete-Generate-Accessors)
|
||||
nmap <silent><buffer> <leader>js <Plug>(JavaComplete-Generate-AccessorSetter)
|
||||
nmap <silent><buffer> <leader>jg <Plug>(JavaComplete-Generate-AccessorGetter)
|
||||
nmap <silent><buffer> <leader>ja <Plug>(JavaComplete-Generate-AccessorSetterGetter)
|
||||
nmap <silent><buffer> <leader>jts <Plug>(JavaComplete-Generate-ToString)
|
||||
nmap <silent><buffer> <leader>jeq <Plug>(JavaComplete-Generate-EqualsAndHashCode)
|
||||
nmap <silent><buffer> <leader>jc <Plug>(JavaComplete-Generate-Constructor)
|
||||
nmap <silent><buffer> <leader>jcc <Plug>(JavaComplete-Generate-DefaultConstructor)
|
||||
|
||||
imap <silent><buffer> <C-j>s <Plug>(JavaComplete-Generate-AccessorSetter)
|
||||
imap <silent><buffer> <C-j>g <Plug>(JavaComplete-Generate-AccessorGetter)
|
||||
imap <silent><buffer> <C-j>a <Plug>(JavaComplete-Generate-AccessorSetterGetter)
|
||||
|
||||
vmap <silent><buffer> <leader>js <Plug>(JavaComplete-Generate-AccessorSetter)
|
||||
vmap <silent><buffer> <leader>jg <Plug>(JavaComplete-Generate-AccessorGetter)
|
||||
vmap <silent><buffer> <leader>ja <Plug>(JavaComplete-Generate-AccessorSetterGetter)
|
||||
endfunction
|
||||
augroup SpaceVim_lang_java
|
||||
au!
|
||||
autocmd FileType java setlocal omnifunc=javacomplete#Complete
|
||||
autocmd FileType java call s:java_mappings()
|
||||
set tags +=~/others/openjdksrc/java/tags
|
||||
set tags +=~/others/openjdksrc/javax/tags
|
||||
augroup END
|
||||
endfunction
|
||||
|
@ -1,11 +1,18 @@
|
||||
""
|
||||
" @section Layer-lang-php
|
||||
" lang#php :
|
||||
" this layer is for php development, and it provide auto codo completion,
|
||||
" and syntax check, and jump to the definition location.
|
||||
"
|
||||
" this layer is for php development, and it provide auto codo completion,
|
||||
" and syntax check, and jump to the definition location.
|
||||
"
|
||||
" requirement:
|
||||
" requirement:
|
||||
"
|
||||
" PHP 5.3+
|
||||
"
|
||||
" PCNTL Extension
|
||||
"
|
||||
" Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
|
||||
"
|
||||
" Composer Project
|
||||
"
|
||||
|
||||
|
@ -58,17 +58,6 @@ function! XmlFileTypeInit()
|
||||
set dict+=~/.vim/bundle/vim-dict/dict/android_xml.dic
|
||||
endif
|
||||
endf
|
||||
function! JavaFileTypeInit()
|
||||
set omnifunc=javacomplete#Complete
|
||||
set tags +=~/others/openjdksrc/java/tags
|
||||
set tags +=~/others/openjdksrc/javax/tags
|
||||
inoremap <silent> <buffer> <leader>UU <esc>bgUwea
|
||||
inoremap <silent> <buffer> <leader>uu <esc>bguwea
|
||||
inoremap <silent> <buffer> <leader>ua <esc>bgulea
|
||||
inoremap <silent> <buffer> <leader>Ua <esc>bgUlea
|
||||
nmap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
imap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
endf
|
||||
function! WSDAutoComplete(char)
|
||||
if(getline(".")=~?'^\s*.*\/\/')==0
|
||||
let line = getline('.')
|
||||
|
@ -7,6 +7,8 @@ CONTENTS *SpaceVim-contents*
|
||||
2. Configuration...........................................|SpaceVim-config|
|
||||
3. Functions............................................|SpaceVim-functions|
|
||||
4. Layers..................................................|SpaceVim-layers|
|
||||
5. Layer-lang-php..................................|SpaceVim-layer-lang-php|
|
||||
6. Layer-lang-c......................................|SpaceVim-layer-lang-c|
|
||||
|
||||
==============================================================================
|
||||
INTRODUCTION *SpaceVim-intro*
|
||||
@ -86,7 +88,23 @@ Enable cursorline
|
||||
<
|
||||
|
||||
*g:spacevim_error_symbol*
|
||||
The error symbol used by maker.
|
||||
Set the error symbol of SpaceVim's syntax maker. example:
|
||||
>
|
||||
let g:spacevim_error_symbol = '+'
|
||||
<
|
||||
|
||||
*g:spacevim_warning_symbol*
|
||||
Set the warning symbol of SpaceVim's syntax maker. example:
|
||||
>
|
||||
let g:spacevim_warning_symbol = '!'
|
||||
<
|
||||
|
||||
*g:spacevim_vim_help_language*
|
||||
Set the help language of vim. By default it is `en`, you can change it to
|
||||
chinese.
|
||||
>
|
||||
let g:spacevim_vim_help_language = 'chinese'
|
||||
<
|
||||
|
||||
*g:spacevim_colorscheme*
|
||||
The colorscheme of SpaceVim, if colorscheme groups are installed.
|
||||
@ -203,5 +221,33 @@ LAYERS *SpaceVim-layers*
|
||||
|
||||
SpaceVim support such layers:
|
||||
|
||||
==============================================================================
|
||||
LAYER-LANG-PHP *SpaceVim-layer-lang-php*
|
||||
|
||||
lang#php :
|
||||
|
||||
this layer is for php development, and it provide auto codo completion, and
|
||||
syntax check, and jump to the definition location.
|
||||
|
||||
requirement:
|
||||
|
||||
PHP 5.3+
|
||||
|
||||
PCNTL Extension
|
||||
|
||||
Msgpack 0.5.7+(for NeoVim) Extension or JSON(for Vim 7.4+) Extension
|
||||
|
||||
Composer Project
|
||||
|
||||
|
||||
==============================================================================
|
||||
LAYER-LANG-C *SpaceVim-layer-lang-c*
|
||||
|
||||
lang#c :
|
||||
|
||||
this layer provide c family language code completion.
|
||||
|
||||
requirement: clang libclang
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
Loading…
Reference in New Issue
Block a user