diff --git a/README.md b/README.md index 6368e22bc..dda16231a 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ ga('send', 'pageview'); +![2017-01-07_1363x723](https://cloud.githubusercontent.com/assets/13142418/21739011/6c38c14e-d4ca-11e6-8f3e-2c21dfc489c0.png) + SpaceVim is a Modular configuration, a bundle of custom settings and plugins, for Vim. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 5379ed3c2..5ca181dea 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -184,3 +184,9 @@ endfunction function! SpaceVim#loadPlugins() abort endfunction + +function! SpaceVim#welcome() abort + VimFiler + wincmd p + Startify +endfunction diff --git a/autoload/SpaceVim/autocmds.vim b/autoload/SpaceVim/autocmds.vim index 5b56fdff8..aff82d6a6 100644 --- a/autoload/SpaceVim/autocmds.vim +++ b/autoload/SpaceVim/autocmds.vim @@ -58,6 +58,11 @@ function! SpaceVim#autocmds#init() abort endif autocmd VimResized * wincmd = autocmd BufWritePost *.vim call s:generate_doc() + autocmd FileType * set scrolloff=7 + augroup END + augroup SpaceVimInit + au! + autocmd VimEnter * if !argc() | call SpaceVim#welcome() | endif augroup END endfunction function! s:reload_touchpad_status() abort diff --git a/autoload/zvim/util.vim b/autoload/zvim/util.vim index 387baec10..e41220bb8 100644 --- a/autoload/zvim/util.vim +++ b/autoload/zvim/util.vim @@ -174,8 +174,10 @@ function! zvim#util#OpenVimfiler() abort VimFiler AirlineRefresh wincmd p - IndentLinesToggle - IndentLinesToggle + if &filetype !=# 'startify' + IndentLinesToggle + IndentLinesToggle + endif wincmd p else VimFiler diff --git a/config/plugins.vim b/config/plugins.vim index 42336c3fb..80165b59b 100644 --- a/config/plugins.vim +++ b/config/plugins.vim @@ -98,7 +98,7 @@ let s:plugins.unite = [ \ ['voi/unite-ctags'], \ ['Shougo/unite-session'], \ ['osyo-manga/unite-quickfix'], - \ ['Shougo/vimfiler.vim',{'on_cmd' : 'VimFiler', 'loadconf' : 1 , 'loadconf_before' : 1}], + \ ['Shougo/vimfiler.vim',{'merged' : 0, 'loadconf' : 1 , 'loadconf_before' : 1}], \ ['ujihisa/unite-colorscheme'], \ ['mattn/unite-gist'], \ ['tacroe/unite-mark'], @@ -386,7 +386,7 @@ if zvim#plug#enable_plug() let g:indentLine_char = '¦' let g:indentLine_concealcursor = 'niv' " (default 'inc') let g:indentLine_conceallevel = 2 " (default 2) - let g:indentLine_fileTypeExclude = ['help'] + let g:indentLine_fileTypeExclude = ['help', 'startify', 'vimfiler'] call zvim#plug#add('godlygeek/tabular', { 'on_cmd': 'Tabularize'}) call zvim#plug#add('benizi/vim-automkdir') "[c ]c jump between prev or next hunk diff --git a/config/plugins/vim-startify.vim b/config/plugins/vim-startify.vim index 71a3061cd..d5df47666 100644 --- a/config/plugins/vim-startify.vim +++ b/config/plugins/vim-startify.vim @@ -29,6 +29,7 @@ let g:startify_list_order = [ \ ] "let g:startify_bookmarks = [ {'c': '~/.vimrc'}, '~/.zshrc' ] let g:startify_update_oldfiles = 1 +let g:startify_disable_at_vimenter = 1 let g:startify_session_autoload = 1 let g:startify_session_persistence = 1 "let g:startify_session_delete_buffers = 0 @@ -45,6 +46,8 @@ fu! startify_mapping() endif endf augroup startify_map + au! autocmd FileType startify nnoremap autocmd FileType startify call startify_mapping() + autocmd FileType startify set scrolloff=0 augroup END diff --git a/config/plugins/vimfiler.vim b/config/plugins/vimfiler.vim index 3cd246de6..826ab680c 100644 --- a/config/plugins/vimfiler.vim +++ b/config/plugins/vimfiler.vim @@ -42,10 +42,10 @@ call vimfiler#custom#profile('default', 'context', { \ 'force_hide' : 0, \ }) augroup vfinit -autocmd FileType vimfiler call s:vimfilerinit() -"autocmd VimEnter * if !argc() | VimFiler | endif -autocmd BufEnter * if (winnr('$') == 1 && &filetype ==# 'vimfiler') | - \ q | endif + au! + autocmd FileType vimfiler call s:vimfilerinit() + autocmd BufEnter * if (winnr('$') == 1 && &filetype ==# 'vimfiler') | + \ q | endif augroup END function! s:vimfilerinit() set nonumber