1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:00:05 +08:00

Merge branch 'dev' into dev

This commit is contained in:
Wang Shidong 2017-02-12 15:48:14 +08:00 committed by GitHub
commit 4e61ea21e1
11 changed files with 287 additions and 71 deletions

View File

@ -304,7 +304,7 @@ Name | Description
Name | Description
-------------- | ----------------------
[vimfiler] | Powerful file explorer
[NERD Commenter] | Comment tool - no comment necessary
[nerdcommenter] | Comment tool - no comment necessary
[vinarise] | Hex editor
[syntastic] | Syntax checking hacks
[gita] | An awesome git handling plugin

View File

@ -1,21 +0,0 @@
function! SpaceVim#layers#cursor_move_by_indent#plugins() abort
return [
\ ['ZSaberLv0/ZFVimIndentMove'],
\ ]
endfunction
function! SpaceVim#layers#cursor_move_by_indent#config() abort
nnoremap E <nop>
nnoremap EE ``
nnoremap EH :call ZF_IndentMoveParent('n')<cr>
xnoremap EH :<c-u>call ZF_IndentMoveParent('v')<cr>
nnoremap EL :call ZF_IndentMoveParentEnd('n')<cr>
xnoremap EL :<c-u>call ZF_IndentMoveParentEnd('v')<cr>
nnoremap EK :call ZF_IndentMovePrev('n')<cr>
xnoremap EK :<c-u>call ZF_IndentMovePrev('v')<cr>
nnoremap EJ :call ZF_IndentMoveNext('n')<cr>
xnoremap EJ :<c-u>call ZF_IndentMoveNext('v')<cr>
nnoremap EI :call ZF_IndentMoveChild('n')<cr>
xnoremap EI :<c-u>call ZF_IndentMoveChild('v')<cr>
endfunction

View File

@ -0,0 +1,43 @@
""
" @section exprfold, layer-exprfold
" @parentsection layers
" fold code quickly accorrding to expr
"
" mappings:
" >
" Key mode function
" ZB Normal Open fold block template
" ZF Normal fold block
" ZC Normal fold block comment
" <
function! SpaceVim#layers#exprfold#plugins() abort
return [
\ ['ZSaberLv0/ZFVimFoldBlock', {'merged' : 0}],
\ ]
endfunction
function! SpaceVim#layers#exprfold#config() abort
nnoremap ZB q::call ZF_FoldBlockTemplate()<cr>
nnoremap ZF :ZFFoldBlock //<left>
function! ZF_Plugin_ZFVimFoldBlock_comment() abort
let expr='\(^\s*\/\/\)'
if &filetype ==# 'vim'
let expr.='\|\(^\s*"\)'
endif
if &filetype ==# 'c' || &filetype ==# 'cpp'
let expr.='\|\(^\s*\(\(\/\*\)\|\(\*\)\)\)'
endif
if &filetype ==# 'make'
let expr.='\|\(^\s*#\)'
endif
let disableE2vSaved = g:ZFVimFoldBlock_disableE2v
let g:ZFVimFoldBlock_disableE2v = 1
call ZF_FoldBlock('/' . expr . '//')
let g:ZFVimFoldBlock_disableE2v = disableE2vSaved
echo 'comments folded'
endfunction
nnoremap ZC :call ZF_Plugin_ZFVimFoldBlock_comment()<cr>
endfunction

View File

@ -1,29 +0,0 @@
function! SpaceVim#layers#fold_by_regexp#plugins() abort
return [
\ ['ZSaberLv0/ZFVimFoldBlock'],
\ ]
endfunction
function! SpaceVim#layers#fold_by_regexp#config() abort
nnoremap ZB q::call ZF_FoldBlockTemplate()<cr>
nnoremap ZF :ZFFoldBlock //<left>
function! ZF_Plugin_ZFVimFoldBlock_comment()
let expr='\(^\s*\/\/\)'
if &filetype=='vim'
let expr.='\|\(^\s*"\)'
endif
if &filetype=='c' || &filetype=='cpp'
let expr.='\|\(^\s*\(\(\/\*\)\|\(\*\)\)\)'
endif
if &filetype=='make'
let expr.='\|\(^\s*#\)'
endif
let disableE2vSaved = g:ZFVimFoldBlock_disableE2v
let g:ZFVimFoldBlock_disableE2v = 1
call ZF_FoldBlock("/" . expr . "//")
let g:ZFVimFoldBlock_disableE2v = disableE2vSaved
echo "comments folded"
endfunction
nnoremap ZC :call ZF_Plugin_ZFVimFoldBlock_comment()<cr>
endfunction

View File

@ -0,0 +1,43 @@
""
" @section indentmove, layer-indentmove
" @parentsection layers
" move cursor quickly accorrding to indent
"
" mappings:
" >
" Key mode function
" EH Normal/vasual move up to nearest line with smaller
" indent level
" EL Normal/vasual move down to nearest line with larger
" indent level
" EJ Normal/vasual move down to nearest line with smaller
" or same indent level
" EK Normal/vasual move down to nearest line with larger
" or same indent level
" EI Normal/vasual move down to nearest child indent
" <
"
"
function! SpaceVim#layers#indentmove#plugins() abort
return [
\ ['ZSaberLv0/ZFVimIndentMove', { 'merged' : 0}],
\ ]
endfunction
function! SpaceVim#layers#indentmove#config() abort
nnoremap <silent> E <nop>
nnoremap <silent> EE ``
nnoremap <silent> EH :call ZF_IndentMoveParent('n')<cr>
xnoremap <silent> EH :<c-u>call ZF_IndentMoveParent('v')<cr>
nnoremap <silent> EL :call ZF_IndentMoveParentEnd('n')<cr>
xnoremap <silent> EL :<c-u>call ZF_IndentMoveParentEnd('v')<cr>
nnoremap <silent> EK :call ZF_IndentMovePrev('n')<cr>
xnoremap <silent> EK :<c-u>call ZF_IndentMovePrev('v')<cr>
nnoremap <silent> EJ :call ZF_IndentMoveNext('n')<cr>
xnoremap <silent> EJ :<c-u>call ZF_IndentMoveNext('v')<cr>
nnoremap <silent> EI :call ZF_IndentMoveChild('n')<cr>
xnoremap <silent> EI :<c-u>call ZF_IndentMoveChild('v')<cr>
endfunction

View File

@ -24,15 +24,17 @@ CONTENTS *SpaceVim-contents*
2. autocomplete..................................|SpaceVim-autocomplete|
3. checkers....................................|SpaceVim-layer-checkers|
4. colorscheme....................................|SpaceVim-colorscheme|
5. lang#c........................................|SpaceVim-layer-lang-c|
6. lang#elixir..............................|SpaceVim-layer-lang-elixir|
7. lang#go......................................|SpaceVim-layer-lang-go|
8. lang#java..................................|SpaceVim-layer-lang-java|
9. lang#php....................................|SpaceVim-layer-lang-php|
10. lang#python.............................|SpaceVim-layer-lang-python|
11. lang#rust.................................|SpaceVim-layer-lang-rust|
12. lang#xml...................................|SpaceVim-layer-lang-xml|
13. shell.........................................|SpaceVim-layer-shell|
5. exprfold....................................|SpaceVim-layer-exprfold|
6. indentmove................................|SpaceVim-layer-indentmove|
7. lang#c........................................|SpaceVim-layer-lang-c|
8. lang#elixir..............................|SpaceVim-layer-lang-elixir|
9. lang#go......................................|SpaceVim-layer-lang-go|
10. lang#java.................................|SpaceVim-layer-lang-java|
11. lang#php...................................|SpaceVim-layer-lang-php|
12. lang#python.............................|SpaceVim-layer-lang-python|
13. lang#rust.................................|SpaceVim-layer-lang-rust|
14. lang#xml...................................|SpaceVim-layer-lang-xml|
15. shell.........................................|SpaceVim-layer-shell|
5. FAQ........................................................|SpaceVim-faq|
==============================================================================
@ -427,6 +429,40 @@ colorschemes: if the colorscheme you want do not list below, PR welcome.
OceanicNext
<
==============================================================================
EXPRFOLD *SpaceVim-layer-exprfold*
fold code quickly accorrding to expr
mappings:
>
Key mode function
ZB Normal Open fold block template
ZF Normal fold block
ZC Normal fold block comment
<
==============================================================================
INDENTMOVE *SpaceVim-layer-indentmove*
move cursor quickly accorrding to indent
mappings:
>
Key mode function
EH Normal/vasual move up to nearest line with smaller
indent level
EL Normal/vasual move down to nearest line with larger
indent level
EJ Normal/vasual move down to nearest line with smaller
or same indent level
EK Normal/vasual move down to nearest line with larger
or same indent level
EI Normal/vasual move down to nearest child indent
<
==============================================================================
LANG#C *SpaceVim-layer-lang-c*

View File

@ -1,6 +1,16 @@
<!doctype html>
<html>
<head>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?c6bde3c13e6fd8fde7357f71b4dd53a7";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=60680063" charset="UTF-8"></script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
@ -11,7 +21,7 @@
<!-- End Google Tag Manager -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>SpaceVim - A community-driven Vim distribution</title>
<title>SpaceVim - {{ page.title | default: site.description }}</title>
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="{{ '/assets/js/respond.js' | relative_url }}"></script>
@ -36,16 +46,6 @@
s.parentNode.insertBefore(bp, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?c6bde3c13e6fd8fde7357f71b4dd53a7";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=60680063" charset="UTF-8"></script>
</head>
<body>
<!-- Google Tag Manager (noscript) -->

View File

@ -0,0 +1,126 @@
# [Blogs](https://spacevim.org/community#blogs) > Use Vim as a Java IDE
I am a vimmer and a java developer. Here are some useful plugins for developing java in vim/neovim.
![2017-02-01_1360x721](https://cloud.githubusercontent.com/assets/13142418/22506638/84705532-e8bc-11e6-8b72-edbdaf08426b.png)
## Project manager
1. [unite](https://github.com/Shougo/unite.vim) - file and code fuzzy founder.
![](https://s3.amazonaws.com/github-csexton/unite-01.gif)
The unite or unite.vim plug-in can search and display information from arbitrary sources like files, buffers, recently used files or registers. You can run several pre-defined actions on a target displayed in the unite window.
The difference between unite and similar plug-ins like fuzzyfinder, ctrl-p or ku is that unite provides an integration interface for several sources and you can create new interfaces using unite.
You can also use unite with [ag](https://github.com/ggreer/the_silver_searcher), that will make searching faster.
*config unite with ag or other tools support*
```viml
if executable('hw')
" Use hw (highway)
" https://github.com/tkengo/highway
let g:unite_source_grep_command = 'hw'
let g:unite_source_grep_default_opts = '--no-group --no-color'
let g:unite_source_grep_recursive_opt = ''
elseif executable('ag')
" Use ag (the silver searcher)
" https://github.com/ggreer/the_silver_searcher
let g:unite_source_grep_command = 'ag'
let g:unite_source_grep_default_opts =
\ '-i --line-numbers --nocolor ' .
\ '--nogroup --hidden --ignore ' .
\ '''.hg'' --ignore ''.svn'' --ignore' .
\ ' ''.git'' --ignore ''.bzr'''
let g:unite_source_grep_recursive_opt = ''
elseif executable('pt')
" Use pt (the platinum searcher)
" https://github.com/monochromegane/the_platinum_searcher
let g:unite_source_grep_command = 'pt'
let g:unite_source_grep_default_opts = '--nogroup --nocolor'
let g:unite_source_grep_recursive_opt = ''
elseif executable('ack-grep')
" Use ack
" http://beyondgrep.com/
let g:unite_source_grep_command = 'ack-grep'
let g:unite_source_grep_default_opts =
\ '-i --no-heading --no-color -k -H'
let g:unite_source_grep_recursive_opt = ''
elseif executable('ack')
let g:unite_source_grep_command = 'ack'
let g:unite_source_grep_default_opts = '-i --no-heading' .
\ ' --no-color -k -H'
let g:unite_source_grep_recursive_opt = ''
elseif executable('jvgrep')
" Use jvgrep
" https://github.com/mattn/jvgrep
let g:unite_source_grep_command = 'jvgrep'
let g:unite_source_grep_default_opts =
\ '-i --exclude ''\.(git|svn|hg|bzr)'''
let g:unite_source_grep_recursive_opt = '-R'
elseif executable('beagrep')
" Use beagrep
" https://github.com/baohaojun/beagrep
let g:unite_source_grep_command = 'beagrep'
endif
```
2. [vimfiler](https://github.com/Shougo/vimfiler.vim) - A powerful file explorer implemented in Vim script
*Use vimfiler as default file explorer*
> for more information, you should read the documentation of vimfiler.
```viml
let g:vimfiler_as_default_explorer = 1
call vimfiler#custom#profile('default', 'context', {
\ 'explorer' : 1,
\ 'winwidth' : 30,
\ 'winminwidth' : 30,
\ 'toggle' : 1,
\ 'columns' : 'type',
\ 'auto_expand': 1,
\ 'direction' : 'rightbelow',
\ 'parent': 0,
\ 'explorer_columns' : 'type',
\ 'status' : 1,
\ 'safe' : 0,
\ 'split' : 1,
\ 'hidden': 1,
\ 'no_quit' : 1,
\ 'force_hide' : 0,
\ })
```
3. [tagbar](https://github.com/majutsushi/tagbar) - Vim plugin that displays tags in a window, ordered by scope
## Code formatting
1. [neoformat](https://github.com/sbdchd/neoformat) - A (Neo)vim plugin for formatting code.
For formatting java code, you also nEed have [uncrustify](http://astyle.sourceforge.net/) or [astyle](http://astyle.sourceforge.net/) in your PATH.
BTW, the google's [java formatter](https://github.com/google/google-java-format) also works well with neoformat.
## Code completion
1. [javacomplete2](https://github.com/artur-shaik/vim-javacomplete2) - Updated javacomplete plugin for vim
- Demo
![vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2/raw/master/doc/demo.gif)
- Generics demo
![vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2/raw/master/doc/generics_demo.gif)
2. [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) - Dark powered asynchronous completion framework for neovim
3. [neocomplete.vim](https://github.com/Shougo/neocomplete.vim) - Next generation completion framework after neocomplcache
## Syntax lint
1. [neomake](https://github.com/neomake/neomake) - Asynchronous linting and make framework for Neovim/Vim
I am maintainer of javac maker in neomake, the javac maker support maven project, gradle project or eclipse project.
also you can set the classpath.

View File

@ -1,3 +1,7 @@
---
title: "About SpaceVim"
---
# About SpaceVim
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim,

View File

@ -15,3 +15,13 @@ Try these SpaceVim hangouts for any questions, problems or comments.
## Discuss
To report an issue or give feedback to the developers, please use the [issue tracker](https://github.com/SpaceVim/SpaceVim/issues).
## Blogs
<ul>
{% for post in site.posts %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>

View File

@ -1,3 +1,7 @@
---
title: "A community-driven Vim distribution"
---
# Introduction