Skip to content

Commit c66930e

Browse files
committed
Close non-edit buffer automatically better
- update LAYERS.md - update server layers' README.md
1 parent 178f6ec commit c66930e

8 files changed

Lines changed: 36 additions & 27 deletions

File tree

core/autoload/spacevim/plug/nerdtree.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
scriptencoding utf-8
22

3+
let g:spacevim#plug#nerdtree#ignore = [
4+
\ '\.py[cd]$', '\~$', '\.swo$', '\.swp$', '\.DS_Store$',
5+
\ '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$',
6+
\ ]
37
let g:spacevim#plug#nerdtree#IndicatorMapCustom = {
48
\ 'Modified' : '',
59
\ 'Staged' : '',

core/autoload/spacevim/plug/startify.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
scriptencoding utf-8
2+
13
function! s:get_nvim_version()
2-
redir => s
4+
redir => l:s
35
silent! version
46
redir END
5-
return matchstr(s, 'NVIM v\zs[^\n]*')
7+
return matchstr(l:s, 'NVIM v\zs[^\n]*')
68
endfunction
79

810
let s:version = g:spacevim_nvim ? 'nvim '.s:get_nvim_version() : 'vim '.v:version

layers/+distributions/spacevim/config.vim

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,10 @@ augroup spacevimBasic
2525
" http://vim.wikia.com/wiki/Speed_up_Syntax_Highlighting
2626
autocmd BufEnter * :syntax sync maxlines=200
2727

28-
autocmd BufEnter * call MyLastWindow()
29-
function! MyLastWindow()
30-
" if the window is quickfix/locationlist
31-
let l:bt_blacklist = ['quickfix', 'locationlist']
32-
let l:ft_blocklist = ['quickmenu']
33-
if index(l:bt_blacklist, &buftype) >= 0 || index(l:ft_blocklist, &ft) >= 0
34-
" if this window is last on screen quit without warning
35-
if winbufnr(2) == -1
36-
quit!
37-
endif
38-
endif
39-
endfunction
28+
" Close vim if the last edit buffer is closed, i.e., close NERDTree,
29+
" undotree, quickfix etc automatically.
30+
autocmd BufEnter * if 0 == len(filter(range(1, winnr('$')), 'empty(getbufvar(winbufnr(v:val), "&bt"))')) | qa! | endif
31+
4032
" http://stackoverflow.com/questions/5933568/disable-blinking-at-the-first-last-line-of-the-file
4133
autocmd GUIEnter * set t_vb=
4234

layers/+lang/c-c++/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ Key Binding | Mode | Description
2828

2929
## Related Projects
3030

31-
- https://github.com/bbchung/clighter8
31+
- [clighter8](https://github.com/bbchung/clighter8)

layers/+tools/file-manager/config.vim

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ scriptencoding utf-8
77
let g:NERDTreeDirArrowExpandable = "\u276f"
88
"
99
let g:NERDTreeDirArrowCollapsible = "\u25bd"
10-
let g:NERDTreeIgnore=[
11-
\ '\.py[cd]$', '\~$', '\.swo$', '\.swp$', '\.DS_Store$',
12-
\ '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$',
13-
\ ]
14-
" close vim if the only window left open is a NERDTree
15-
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
10+
let g:NERDTreeIgnore = g:spacevim#plug#nerdtree#ignore
1611

1712
nnoremap <F4> :NERDTreeToggle<CR>
1813
inoremap <F4> <ESC>:NERDTreeToggle<CR>

layers/+version-control/git/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111

1212
## Description
1313

14+
This layer adds support for git.
15+
1416
## Install
1517

18+
To use this configuration layer, add it to your `~/.spacevim`.
19+
1620
## Key Bindings
21+
22+
## Related Projects
23+
24+
- [gitv](https://github.com/gregsexton/gitv)

layers/+vim/which-key/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
## Table of Contents
44

55
<!-- vim-markdown-toc GFM -->
6+
67
* [Description](#description)
78
* [Install](#install)
89
* [Key Bindings](#key-bindings)
10+
* [Related projects](#related-projects)
911

1012
<!-- vim-markdown-toc -->
1113

@@ -18,3 +20,7 @@ This layer displayes the avaliable key bindings automatically. Note that it's st
1820
To use this configuration layer, add it to your `~/.spacevim`.
1921

2022
## Key Bindings
23+
24+
## Related projects
25+
26+
- [quickmenu.vim](https://github.com/skywind3000/quickmenu.vim)

layers/LAYERS.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,28 @@ Layer Manifest
44
Topic | Layer | Plugins
55
:----: | :----: | :----
66
+vim | [text-align](https://github.com/liuchengxu/space-vim/tree/master/layers/+vim/text-align) | <ul><li>[godlygeek/tabular](https://github.com/godlygeek/tabular)</li><li>[junegunn/vim-easy-align](https://github.com/junegunn/vim-easy-align)</li></ul>
7+
+vim | [which-key](https://github.com/liuchengxu/space-vim/tree/master/layers/+vim/which-key) | <ul><li>[hecal3/vim-leader-guide](https://github.com/hecal3/vim-leader-guide)</li></ul>
78
+vim | [ctrlp](https://github.com/liuchengxu/space-vim/tree/master/layers/+vim/ctrlp) | <ul><li>[ctrlpvim/ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim)</li><li>[FelikZ/ctrlp-py-matcher](https://github.com/FelikZ/ctrlp-py-matcher)</li></ul>
89
+vim | [better-motion](https://github.com/liuchengxu/space-vim/tree/master/layers/+vim/better-motion) | <ul><li>[justinmk/vim-sneak](https://github.com/justinmk/vim-sneak)</li><li>[easymotion/vim-easymotion](https://github.com/easymotion/vim-easymotion)</li><li>[haya14busa/incsearch-easymotion.vim](https://github.com/haya14busa/incsearch-easymotion.vim)</li></ul>
910
+version-control | [github](https://github.com/liuchengxu/space-vim/tree/master/layers/+version-control/github) | <ul><li>[junegunn/vim-github-dashboard](https://github.com/junegunn/vim-github-dashboard)</li><li>[mattn/gist-vim](https://github.com/mattn/gist-vim)</li></ul>
1011
+version-control | [git](https://github.com/liuchengxu/space-vim/tree/master/layers/+version-control/git) | <ul><li>[junegunn/gv.vim](https://github.com/junegunn/gv.vim)</li><li>[tpope/vim-fugitive](https://github.com/tpope/vim-fugitive)</li><li>[airblade/vim-gitgutter](https://github.com/airblade/vim-gitgutter)</li></ul>
1112
+checkers | [syntax-checking](https://github.com/liuchengxu/space-vim/tree/master/layers/+checkers/syntax-checking) | <ul><li>[w0rp/ale](https://github.com/w0rp/ale)</li><li>[scrooloose/syntastic](https://github.com/scrooloose/syntastic)</li></ul>
1213
+completion | [unite](https://github.com/liuchengxu/space-vim/tree/master/layers/+completion/unite) | <ul><li>[Shougo/unite.vim](https://github.com/Shougo/unite.vim)</li></ul>
1314
+completion | [auto-completion](https://github.com/liuchengxu/space-vim/tree/master/layers/+completion/auto-completion) | <ul><li>[roxma/nvim-completion-manager](https://github.com/roxma/nvim-completion-manager)</li><li>[roxma/nvim-cm-racer](https://github.com/roxma/nvim-cm-racer)</li><li>[roxma/ncm-clang](https://github.com/roxma/ncm-clang)</li><li>[Shougo/neco-vim](https://github.com/Shougo/neco-vim)</li><li>[roxma/ncm-github](https://github.com/roxma/ncm-github)</li><li>[fgrsnau/ncm-otherbuf](https://github.com/fgrsnau/ncm-otherbuf)</li><li>[maralla/completor.vim](https://github.com/maralla/completor.vim)</li><li>[maralla/completor-neosnippet](https://github.com/maralla/completor-neosnippet)</li><li>[lifepillar/vim-mucomplete](https://github.com/lifepillar/vim-mucomplete)</li></ul>
14-
+completion | [deoplete](https://github.com/liuchengxu/space-vim/tree/master/layers/+completion/deoplete) | <ul><li>[Shougo/deoplete.nvim](https://github.com/Shougo/deoplete.nvim)</li></ul>
15+
+completion | [deoplete](https://github.com/liuchengxu/space-vim/tree/master/layers/+completion/deoplete) | <ul><li>[Shougo/deoplete.nvim](https://github.com/Shougo/deoplete.nvim)</li><li>[eagletmt/neco-ghc](https://github.com/eagletmt/neco-ghc)</li><li>[roxma/nvim-yarp](https://github.com/roxma/nvim-yarp)</li><li>[roxma/vim-hug-neovim-rpc](https://github.com/roxma/vim-hug-neovim-rpc)</li></ul>
16+
+misc | [chinese](https://github.com/liuchengxu/space-vim/tree/master/layers/+misc/chinese) | <ul><li>[yianwillis/vimcdoc](https://github.com/yianwillis/vimcdoc)</li></ul>
1517
+fun | [goyo](https://github.com/liuchengxu/space-vim/tree/master/layers/+fun/goyo) | <ul><li>[junegunn/goyo.vim](https://github.com/junegunn/goyo.vim)</li><li>[junegunn/limelight.vim](https://github.com/junegunn/limelight.vim)</li></ul>
1618
+fun | [emoji](https://github.com/liuchengxu/space-vim/tree/master/layers/+fun/emoji) | <ul><li>[junegunn/vim-emoji](https://github.com/junegunn/vim-emoji)</li></ul>
1719
+fun | [games](https://github.com/liuchengxu/space-vim/tree/master/layers/+fun/games) | <ul><li>[johngrib/vim-game-code-break](https://github.com/johngrib/vim-game-code-break)</li></ul>
1820
+tools | [docker](https://github.com/liuchengxu/space-vim/tree/master/layers/+tools/docker) | <ul><li>[ekalinin/Dockerfile.vim](https://github.com/ekalinin/Dockerfile.vim)</li></ul>
1921
+tools | [ycmd](https://github.com/liuchengxu/space-vim/tree/master/layers/+tools/ycmd) | <ul><li>[rdnetto/YCM-Generator](https://github.com/rdnetto/YCM-Generator)</li><li>[Valloric/YouCompleteMe](https://github.com/Valloric/YouCompleteMe)</li></ul>
2022
+tools | [tmux](https://github.com/liuchengxu/space-vim/tree/master/layers/+tools/tmux) | <ul><li>[christoomey/vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator)</li><li>[lucidstack/ctrlp-tmux.vim](https://github.com/lucidstack/ctrlp-tmux.vim)</li><li>[jebaum/vim-tmuxify](https://github.com/jebaum/vim-tmuxify)</li></ul>
21-
+tools | [file-manager](https://github.com/liuchengxu/space-vim/tree/master/layers/+tools/file-manager) | <ul><li>[danro/rename.vim](https://github.com/danro/rename.vim)</li><li>[scrooloose/nerdtree](https://github.com/scrooloose/nerdtree)</li><li>[Xuyuanp/nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin)</li><li>[tiagofumo/vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight)</li></ul>
23+
+tools | [file-manager](https://github.com/liuchengxu/space-vim/tree/master/layers/+tools/file-manager) | <ul><li>[danro/rename.vim](https://github.com/danro/rename.vim)</li><li>[scrooloose/nerdtree](https://github.com/scrooloose/nerdtree)</li><li>[Xuyuanp/nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin)</li></ul>
2224
+tools | [fzf](https://github.com/liuchengxu/space-vim/tree/master/layers/+tools/fzf) | <ul><li>[Yggdroot/LeaderF](https://github.com/Yggdroot/LeaderF)</li><li>[junegunn/fzf](https://github.com/junegunn/fzf)</li><li>[junegunn/fzf.vim](https://github.com/junegunn/fzf.vim)</li><li>[tweekmonster/fzf-filemru](https://github.com/tweekmonster/fzf-filemru)</li></ul>
23-
+distributions | [better-defaults](https://github.com/liuchengxu/space-vim/tree/master/layers/+distributions/better-defaults) | <ul><li>[tpope/vim-rsi](https://github.com/tpope/vim-rsi)</li><li>[t9md/vim-choosewin](https://github.com/t9md/vim-choosewin)</li><li>[mhinz/vim-startify](https://github.com/mhinz/vim-startify)</li><li>[dominikduda/vim_current_word](https://github.com/dominikduda/vim_current_word)</li><li>[ntpeters/vim-better-whitespace](https://github.com/ntpeters/vim-better-whitespace)</li><li>[haya14busa/is.vim](https://github.com/haya14busa/is.vim)</li><li>[osyo-manga/vim-anzu](https://github.com/osyo-manga/vim-anzu)</li><li>[google/vim-searchindex](https://github.com/google/vim-searchindex)</li><li>[haya14busa/incsearch.vim](https://github.com/haya14busa/incsearch.vim)</li><li>[haya14busa/incsearch-fuzzy.vim](https://github.com/haya14busa/incsearch-fuzzy.vim)</li><li>[kshenoy/vim-signature](https://github.com/kshenoy/vim-signature)</li></ul>
25+
+distributions | [better-defaults](https://github.com/liuchengxu/space-vim/tree/master/layers/+distributions/better-defaults) | <ul><li>[kshenoy/vim-signature](https://github.com/kshenoy/vim-signature)</li><li>[tpope/vim-rsi](https://github.com/tpope/vim-rsi)</li><li>[t9md/vim-choosewin](https://github.com/t9md/vim-choosewin)</li><li>[dominikduda/vim_current_word](https://github.com/dominikduda/vim_current_word)</li><li>[mhinz/vim-startify](https://github.com/mhinz/vim-startify)</li><li>[ntpeters/vim-better-whitespace](https://github.com/ntpeters/vim-better-whitespace)</li><li>[haya14busa/is.vim](https://github.com/haya14busa/is.vim)</li><li>[osyo-manga/vim-anzu](https://github.com/osyo-manga/vim-anzu)</li><li>[google/vim-searchindex](https://github.com/google/vim-searchindex)</li><li>[haya14busa/incsearch.vim](https://github.com/haya14busa/incsearch.vim)</li><li>[haya14busa/incsearch-fuzzy.vim](https://github.com/haya14busa/incsearch-fuzzy.vim)</li></ul>
2426
+distributions | [spacevim](https://github.com/liuchengxu/space-vim/tree/master/layers/+distributions/spacevim) | <ul><li>[liuchengxu/space-vim-dark](https://github.com/liuchengxu/space-vim-dark)</li><li>[liuchengxu/vim-better-default](https://github.com/liuchengxu/vim-better-default)</li><li>[liuchengxu/eleline.vim](https://github.com/liuchengxu/eleline.vim)</li></ul>
2527
+programming | [editing](https://github.com/liuchengxu/space-vim/tree/master/layers/+programming/editing) | <ul><li>[tpope/vim-surround](https://github.com/tpope/vim-surround)</li><li>[jiangmiao/auto-pairs](https://github.com/jiangmiao/auto-pairs)</li><li>[pelodelfuego/vim-swoop](https://github.com/pelodelfuego/vim-swoop)</li><li>[terryma/vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors)</li><li>[scrooloose/nerdcommenter](https://github.com/scrooloose/nerdcommenter)</li></ul>
26-
+programming | [programming](https://github.com/liuchengxu/space-vim/tree/master/layers/+programming/programming) | <ul><li>[luochen1990/rainbow](https://github.com/luochen1990/rainbow)</li><li>[editorconfig/editorconfig-vim](https://github.com/editorconfig/editorconfig-vim)</li><li>[matze/vim-move](https://github.com/matze/vim-move)</li><li>[junegunn/rainbow_parentheses.vim](https://github.com/junegunn/rainbow_parentheses.vim)</li><li>[majutsushi/tagbar](https://github.com/majutsushi/tagbar)</li><li>[Chiel92/vim-autoformat](https://github.com/Chiel92/vim-autoformat)</li><li>[Yggdroot/indentLine](https://github.com/Yggdroot/indentLine)</li><li>[nathanaelkane/vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides)</li><li>[skywind3000/asyncrun.vim](https://github.com/skywind3000/asyncrun.vim)</li><li>[sheerun/vim-polyglot](https://github.com/sheerun/vim-polyglot)</li></ul>
28+
+programming | [programming](https://github.com/liuchengxu/space-vim/tree/master/layers/+programming/programming) | <ul><li>[luochen1990/rainbow](https://github.com/luochen1990/rainbow)</li><li>[sheerun/vim-polyglot](https://github.com/sheerun/vim-polyglot)</li><li>[airblade/vim-rooter](https://github.com/airblade/vim-rooter)</li><li>[editorconfig/editorconfig-vim](https://github.com/editorconfig/editorconfig-vim)</li><li>[matze/vim-move](https://github.com/matze/vim-move)</li><li>[junegunn/rainbow_parentheses.vim](https://github.com/junegunn/rainbow_parentheses.vim)</li><li>[majutsushi/tagbar](https://github.com/majutsushi/tagbar)</li><li>[Chiel92/vim-autoformat](https://github.com/Chiel92/vim-autoformat)</li><li>[Yggdroot/indentLine](https://github.com/Yggdroot/indentLine)</li><li>[nathanaelkane/vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides)</li><li>[skywind3000/asyncrun.vim](https://github.com/skywind3000/asyncrun.vim)</li></ul>
2729
+programming | [code-snippets](https://github.com/liuchengxu/space-vim/tree/master/layers/+programming/code-snippets) | <ul><li>[SirVer/ultisnips](https://github.com/SirVer/ultisnips)</li><li>[honza/vim-snippets](https://github.com/honza/vim-snippets)</li></ul>
2830
+themes | [lightline](https://github.com/liuchengxu/space-vim/tree/master/layers/+themes/lightline) | <ul><li>[itchyny/lightline.vim](https://github.com/itchyny/lightline.vim)</li></ul>
2931
+themes | [airline](https://github.com/liuchengxu/space-vim/tree/master/layers/+themes/airline) | <ul><li>[vim-airline/vim-airline-themes](https://github.com/vim-airline/vim-airline-themes)</li><li>[vim-airline/vim-airline](https://github.com/vim-airline/vim-airline)</li></ul>
@@ -38,7 +40,7 @@ Topic | Layer | Plugins
3840
+lang | [vue](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/vue) | <ul><li>[posva/vim-vue](https://github.com/posva/vim-vue)</li></ul>
3941
+lang | [rust](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/rust) | <ul><li>[rust-lang/rust.vim](https://github.com/rust-lang/rust.vim)</li></ul>
4042
+lang | [erlang](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/erlang) | <ul><li>[vim-erlang/vim-erlang-omnicomplete](https://github.com/vim-erlang/vim-erlang-omnicomplete)</li><li>[vim-erlang/vim-erlang-tags](https://github.com/vim-erlang/vim-erlang-tags)</li><li>[vim-erlang/vim-erlang-compiler](https://github.com/vim-erlang/vim-erlang-compiler)</li><li>[vim-erlang/vim-erlang-skeletons](https://github.com/vim-erlang/vim-erlang-skeletons)</li><li>[vim-erlang/erlang-motions.vim](https://github.com/vim-erlang/erlang-motions.vim)</li></ul>
41-
+lang | [java](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/java) | <ul><li>[artur-shaik/vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2)</li><li>[airblade/vim-rooter](https://github.com/airblade/vim-rooter)</li></ul>
43+
+lang | [java](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/java) | <ul><li>[artur-shaik/vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2)</li></ul>
4244
+lang | [elm](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/elm) | <ul><li>[ElmCast/elm-vim](https://github.com/ElmCast/elm-vim)</li></ul>
4345
+lang | [html](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/html) | <ul><li>[othree/html5.vim](https://github.com/othree/html5.vim)</li><li>[mattn/emmet-vim](https://github.com/mattn/emmet-vim)</li></ul>
4446
+lang | [solidity](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/solidity) | <ul><li>[tomlion/vim-solidity](https://github.com/tomlion/vim-solidity)</li></ul>
@@ -47,4 +49,4 @@ Topic | Layer | Plugins
4749
+lang | [javascript](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/javascript) | <ul><li>[pangloss/vim-javascript](https://github.com/pangloss/vim-javascript)</li><li>[mxw/vim-jsx](https://github.com/mxw/vim-jsx)</li><li>[neoclide/vim-jsx-improve](https://github.com/neoclide/vim-jsx-improve)</li></ul>
4850
+lang | [ruby](https://github.com/liuchengxu/space-vim/tree/master/layers/+lang/ruby) | <ul><li>[vim-ruby/vim-ruby](https://github.com/vim-ruby/vim-ruby)</li></ul>
4951

50-
Last updated: 2017-11-30 18:03:39
52+
Last updated: 2018-01-12 10:12:53

0 commit comments

Comments
 (0)