diff --git a/.SpaceVim.d/init.vim b/.SpaceVim.d/init.vim index 8c2993963..df5fbfda9 100644 --- a/.SpaceVim.d/init.vim +++ b/.SpaceVim.d/init.vim @@ -14,7 +14,7 @@ call SpaceVim#custom#SPC('nnoremap', ['a', 'o'], 'call SpaceVim#dev#todo#list()' " after run make test, the vader will be downloaded to ./build/vader/ -set rtp+=build/vader +let &runtimepath .= ',' . fnamemodify(g:_spacevim_root_dir, ':p:h:h') . '/build/vader' " vader language specific key bindings diff --git a/autoload/SpaceVim/layers/core/statusline.vim b/autoload/SpaceVim/layers/core/statusline.vim index f2d854821..5821b1f15 100644 --- a/autoload/SpaceVim/layers/core/statusline.vim +++ b/autoload/SpaceVim/layers/core/statusline.vim @@ -342,6 +342,15 @@ function! SpaceVim#layers#core#statusline#get(...) abort \ . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' \ . s:lsep \ . '%#SpaceVim_statusline_b# Gista %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' ' + elseif &buftype ==# 'terminal' + let st = '%#SpaceVim_statusline_ia#' + \ . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' + \ . s:lsep + \ . '%#SpaceVim_statusline_b# Terminal %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep + if !empty(get(b:, '_spacevim_shell', '')) + let st .= '%#SpaceVim_statusline_c# %{b:_spacevim_shell} %#SpaceVim_statusline_c_SpaceVim_statusline_z#' . s:lsep + endif + return st elseif &filetype ==# 'gina-status' return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep \ . '%#SpaceVim_statusline_b# Gina status %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' ' diff --git a/autoload/SpaceVim/layers/shell.vim b/autoload/SpaceVim/layers/shell.vim index 9da6a50f3..da06594ff 100644 --- a/autoload/SpaceVim/layers/shell.vim +++ b/autoload/SpaceVim/layers/shell.vim @@ -153,6 +153,11 @@ function! s:open_default_shell() abort if s:default_shell ==# 'terminal' if exists(':terminal') if has('nvim') + if s:SYSTEM.isWindows + let shell = empty($SHELL) ? 'cmd.exe' : $SHELL + else + let shell = empty($SHELL) ? 'bash' : $SHELL + endif terminal " @bug cursor is not cleared when open terminal windows. " in neovim-qt when using :terminal to open a shell windows, the orgin @@ -175,6 +180,9 @@ function! s:open_default_shell() abort endif let s:term_buf_nr = term_start(shell, {'curwin' : 1, 'term_finish' : 'close'}) endif + let b:_spacevim_shell = shell + " use WinEnter autocmd to update statusline + doautocmd WinEnter let s:shell_win_nr = winnr() let w:shell_layer_win = 1 setlocal nobuflisted nonumber norelativenumber diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 394200463..69b628aa0 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -1135,46 +1135,46 @@ MAPPINGS Mode Key Function ------------------------------------------------------------- - normal SPC l g A generate accessors - normal SPC l g s generate setter accessor - normal SPC l g g generate getter accessor - normal SPC l g a generate setter and getter accessor - normal SPC l g t generate toString function - normal SPC l g e generate equals and hashcode function - normal SPC l g c generate constructor - normal SPC l g C generate default constructor - insert s generate setter accessor - insert g generate getter accessor - insert a generate getter and setter accessor - visual SPC l g s generate setter accessor - visual SPC l g g generate getter accessor - visual SPC l g a generate setter and getter accessor + normal SPC l g A generate accessors + normal SPC l g s generate setter accessor + normal SPC l g g generate getter accessor + normal SPC l g a generate setter and getter accessor + normal SPC l g t generate toString function + normal SPC l g e generate equals and hashcode function + normal SPC l g c generate constructor + normal SPC l g C generate default constructor + insert s generate setter accessor + insert g generate getter accessor + insert a generate getter and setter accessor + visual SPC l g s generate setter accessor + visual SPC l g g generate getter accessor + visual SPC l g a generate setter and getter accessor Maven key bindings: Mode Key Function ------------------------------------------------------------- - normal SPC l m i Run maven clean install - normal SPC l m I Run maven install - normal SPC l m p Run one already goal from list - normal SPC l m r Run maven goals - normal SPC l m R Run one maven goal - normal SPC l m t Run maven test + normal SPC l m i run maven clean install + normal SPC l m I run maven install + normal SPC l m p run one already goal from list + normal SPC l m r run maven goals + normal SPC l m R run one maven goal + normal SPC l m t run maven test Jump key bindings: Mode Key Function ------------------------------------------------------------- - normal SPC l j a jump to alternate file + normal SPC l j a jump to alternate file REPL key bindings: Mode Key Function ------------------------------------------------------------- - normal SPC l s i start a jshell inferior REPL process - normal SPC l s b send buffer and keep code buffer focused - normal SPC l s l send line and keep code buffer focused - normal SPC l s s send selection text and keep code buffer focused + normal SPC l s i start a jshell inferior REPL process + normal SPC l s b send buffer and keep code buffer focused + normal SPC l s l send line and keep code buffer focused + normal SPC l s s send selection text and keep code buffer focused < CODE FORMATTING To make neoformat support java file, you should install uncrustify. or