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

Merge branch 'dev' into fixup

This commit is contained in:
Wang Shidong 2017-08-21 19:46:32 +08:00 committed by GitHub
commit d13bdff59a
3 changed files with 467 additions and 429 deletions

View File

@ -18,413 +18,449 @@ let s:VIMCOMP = SpaceVim#api#import('vim#compatible')
" init
let s:separators = {
\ 'arrow' : ["\ue0b0", "\ue0b2"],
\ 'curve' : ["\ue0b4", "\ue0b6"],
\ 'slant' : ["\ue0b8", "\ue0ba"],
\ 'brace' : ["\ue0d2", "\ue0d4"],
\ 'fire' : ["\ue0c0", "\ue0c2"],
\ 'nil' : ['', ''],
\ }
\ 'arrow' : ["\ue0b0", "\ue0b2"],
\ 'curve' : ["\ue0b4", "\ue0b6"],
\ 'slant' : ["\ue0b8", "\ue0ba"],
\ 'brace' : ["\ue0d2", "\ue0d4"],
\ 'fire' : ["\ue0c0", "\ue0c2"],
\ 'nil' : ['', ''],
\ }
let s:i_separators = {
\ 'arrow' : ["\ue0b1", "\ue0b3"],
\ 'bar' : ["|", "|"],
\ 'nil' : ['', ''],
\ }
\ 'arrow' : ["\ue0b1", "\ue0b3"],
\ 'bar' : ["|", "|"],
\ 'nil' : ['', ''],
\ }
let s:loaded_modes = ['syntax-checking']
let s:modes = {
\ 'center-cursor': {
\ 'icon' : '⊝',
\ 'desc' : 'centered-cursor mode',
\ },
\ 'hi-characters-for-long-lines' :{
\ 'icon' : '⑧',
\ 'desc' : 'toggle highlight of characters for long lines',
\ },
\ 'fill-column-indicator' :{
\ 'icon' : s:MESSLETTERS.circled_letter('f'),
\ 'desc' : 'fill-column-indicator mode',
\ },
\ 'syntax-checking' :{
\ 'icon' : s:MESSLETTERS.circled_letter('s'),
\ 'desc' : 'syntax-checking mode',
\ },
\ 'spell-checking' :{
\ 'icon' : s:MESSLETTERS.circled_letter('S'),
\ 'desc' : 'spell-checking mode',
\ },
\ 'whitespace' :{
\ 'icon' : s:MESSLETTERS.circled_letter('w'),
\ 'desc' : 'whitespace mode',
\ },
\ }
\ 'center-cursor': {
\ 'icon' : '⊝',
\ 'desc' : 'centered-cursor mode',
\ },
\ 'hi-characters-for-long-lines' :{
\ 'icon' : '⑧',
\ 'desc' : 'toggle highlight of characters for long lines',
\ },
\ 'fill-column-indicator' :{
\ 'icon' : s:MESSLETTERS.circled_letter('f'),
\ 'desc' : 'fill-column-indicator mode',
\ },
\ 'syntax-checking' :{
\ 'icon' : s:MESSLETTERS.circled_letter('s'),
\ 'desc' : 'syntax-checking mode',
\ },
\ 'spell-checking' :{
\ 'icon' : s:MESSLETTERS.circled_letter('S'),
\ 'desc' : 'spell-checking mode',
\ },
\ 'whitespace' :{
\ 'icon' : s:MESSLETTERS.circled_letter('w'),
\ 'desc' : 'whitespace mode',
\ },
\ }
let s:loaded_sections = ['syntax checking', 'major mode', 'minor mode lighters', 'version control info', 'cursorpos']
function! s:battery_status() abort
if executable('acpi')
return ' ⚡' . substitute(split(system('acpi'))[-1], '%', '%%', 'g') . ' '
else
return ''
endif
if executable('acpi')
return ' ⚡' . substitute(split(system('acpi'))[-1], '%', '%%', 'g') . ' '
else
return ''
endif
endfunction
function! s:check_mode() abort
if mode() == 'n'
return 'n'
elseif mode() =='i'
return 'i'
elseif mode() =~ 'v'
return 'v'
elseif mode() =~ 'R'
return 'R'
endif
if mode() == 'n'
return 'n'
elseif mode() =='i'
return 'i'
elseif mode() =~ 'v'
return 'v'
elseif mode() =~ 'R'
return 'R'
endif
endfunction
function! s:search_status() abort
let ct = 0
let tt = 0
let ctl = split(s:VIMCOMP.execute('keeppatterns .,$s/' . @/ . '//gn', 'silent!'), "\n")
if !empty(ctl)
let ct = split(ctl[0])[0]
endif
let ttl = split(s:VIMCOMP.execute('keeppatterns %s/' . @/ . '//gn', 'silent!'), "\n")
if !empty(ctl)
let tt = split(ttl[0])[0]
endif
return ' ' . (str2nr(tt) - str2nr(ct) + 1) . '/' . tt . ' '
let ct = 0
let tt = 0
let ctl = split(s:VIMCOMP.execute('keeppatterns .,$s/' . @/ . '//gn', 'silent!'), "\n")
if !empty(ctl)
let ct = split(ctl[0])[0]
endif
let ttl = split(s:VIMCOMP.execute('keeppatterns %s/' . @/ . '//gn', 'silent!'), "\n")
if !empty(ctl)
let tt = split(ttl[0])[0]
endif
return ' ' . (str2nr(tt) - str2nr(ct) + 1) . '/' . tt . ' '
endfunction
function! s:time() abort
return ' ' . s:TIME.current_time() . ' '
return ' ' . s:TIME.current_time() . ' '
endfunction
if g:spacevim_enable_neomake
function! s:syntax_checking()
if !exists('g:loaded_neomake')
return ''
endif
let counts = neomake#statusline#LoclistCounts()
let warnings = get(counts, 'W', 0)
let errors = get(counts, 'E', 0)
let l = warnings ? ' %#SpaceVim_statusline_warn#●' . warnings . ' ' : ''
let l .= errors ? (warnings ? '' : ' ') . '%#SpaceVim_statusline_error#●' . errors . ' ' : ''
return l
endfunction
function! s:syntax_checking()
if !exists('g:loaded_neomake')
return ''
endif
let counts = neomake#statusline#LoclistCounts()
let warnings = get(counts, 'W', 0)
let errors = get(counts, 'E', 0)
let l = warnings ? ' %#SpaceVim_statusline_warn#●' . warnings . ' ' : ''
let l .= errors ? (warnings ? '' : ' ') . '%#SpaceVim_statusline_error#●' . errors . ' ' : ''
return l
endfunction
else
function! s:syntax_checking()
if !exists(':SyntasticCheck')
return ''
endif
let l = SyntasticStatuslineFlag()
if strlen(l) > 0
return l
else
return ''
endif
endfunction
function! s:syntax_checking()
if !exists(':SyntasticCheck')
return ''
endif
let l = SyntasticStatuslineFlag()
if strlen(l) > 0
return l
else
return ''
endif
endfunction
endif
function! s:winnr(...) abort
if a:0 > 1
return ' ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
else
return '%{SpaceVim#layers#core#statusline#mode(mode())} ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
endif
if a:0 > 1
return ' ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
else
return '%{SpaceVim#layers#core#statusline#mode(mode())} ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
endif
endfunction
function! s:filename() abort
let name = fnamemodify(bufname('%'), ':t')
if empty(name)
let name = 'No Name'
endif
return (&modified ? ' * ' : ' - ') . s:filesize() . name . ' '
let name = fnamemodify(bufname('%'), ':t')
if empty(name)
let name = 'No Name'
endif
return (&modified ? ' * ' : ' - ') . s:filesize() . name . ' '
endfunction
function! s:git_branch() abort
if exists('g:loaded_fugitive')
let l:head = fugitive#head()
if empty(l:head)
call fugitive#detect(getcwd())
let l:head = fugitive#head()
endif
return empty(l:head) ? '' : '  '.l:head . ' '
if exists('g:loaded_fugitive')
let l:head = fugitive#head()
if empty(l:head)
call fugitive#detect(getcwd())
let l:head = fugitive#head()
endif
return ''
return empty(l:head) ? '' : '  '.l:head . ' '
endif
return ''
endfunction
function! s:whitespace() abort
let ln = search('\s\+$', 'n')
if ln != 0
return ' trailing[' . ln . '] '
else
return ''
endif
let ln = search('\s\+$', 'n')
if ln != 0
return ' trailing[' . ln . '] '
else
return ''
endif
endfunction
function! s:cursorpos() abort
return ' %l:%c '
return ' %l:%c '
endfunction
function! s:modes() abort
let m = ' ❖ '
for mode in s:loaded_modes
let m .= s:modes[mode].icon . ' '
endfor
return m . ' '
let m = ' ❖ '
for mode in s:loaded_modes
let m .= s:modes[mode].icon . ' '
endfor
return m . ' '
endfunction
function! s:filesize() abort
let l:size = getfsize(bufname('%'))
if l:size == 0 || l:size == -1 || l:size == -2
return ''
endif
if l:size < 1024
return l:size.' bytes '
elseif l:size < 1024*1024
return printf('%.1f', l:size/1024.0).'k '
elseif l:size < 1024*1024*1024
return printf('%.1f', l:size/1024.0/1024.0) . 'm '
else
return printf('%.1f', l:size/1024.0/1024.0/1024.0) . 'g '
endif
let l:size = getfsize(bufname('%'))
if l:size == 0 || l:size == -1 || l:size == -2
return ''
endif
if l:size < 1024
return l:size.' bytes '
elseif l:size < 1024*1024
return printf('%.1f', l:size/1024.0).'k '
elseif l:size < 1024*1024*1024
return printf('%.1f', l:size/1024.0/1024.0) . 'm '
else
return printf('%.1f', l:size/1024.0/1024.0/1024.0) . 'g '
endif
endfunction
function! SpaceVim#layers#core#statusline#get(...) abort
if &filetype ==# 'vimfiler'
return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# vimfiler %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'startify'
call fugitive#detect(getcwd())
elseif &filetype ==# 'SpaceVimLayerManager'
return '%#SpaceVim_statusline_a#' . s:winnr(1) . '%#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# LayerManager %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'SpaceVimPlugManager'
return '%#SpaceVim_statusline_a#' . s:winnr(1) . '%#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# PlugManager %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'SpaceVimTabsManager'
return '%#SpaceVim_statusline_a#' . s:winnr(1) . '%#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# TabsManager %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'denite'
return '%#SpaceVim_statusline_a_bold# %{SpaceVim#layers#core#statusline#denite_mode()} '
\ . '%#SpaceVim_statusline_a_bold_SpaceVim_statusline_b#' . s:lsep . ' '
\ . '%#SpaceVim_statusline_b#%{denite#get_status_sources()} %#SpaceVim_statusline_b_SpaceVim_statusline_z#' . s:lsep . ' '
\ . '%#SpaceVim_statusline_z#%=%#SpaceVim_statusline_c_SpaceVim_statusline_z#' . s:rsep
\ . '%#SpaceVim_statusline_c# %{denite#get_status_path() . denite#get_status_linenr()}'
elseif &filetype ==# 'unite'
return '%#SpaceVim_statusline_a_bold#%{SpaceVim#layers#core#statusline#unite_mode()} Unite '
\ . '%#SpaceVim_statusline_a_bold_SpaceVim_statusline_b#' . s:lsep . ' %{get(unite#get_context(), "buffer_name", "")} '
\ . '%#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' '
\ . '%#SpaceVim_statusline_c# %{unite#get_status_string()} '
elseif &filetype ==# 'SpaceVimFlyGrep'
return '%#SpaceVim_statusline_a# FlyGrep %#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# %{getcwd()}%#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
\ . '%#SpaceVim_statusline_c# %{SpaceVim#plugins#flygrep#lineNr()}'
elseif &filetype ==# 'TransientState'
return '%#SpaceVim_statusline_a# Transient State %#SpaceVim_statusline_a_SpaceVim_statusline_b#'
elseif &filetype ==# 'HelpDescribe'
return '%#SpaceVim_statusline_a# HelpDescribe %#SpaceVim_statusline_a_SpaceVim_statusline_b#'
endif
if a:0 > 0
return s:active()
else
return s:inactive()
endif
if &filetype ==# 'vimfiler'
return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# vimfiler %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'startify'
call fugitive#detect(getcwd())
elseif &filetype ==# 'SpaceVimLayerManager'
return '%#SpaceVim_statusline_a#' . s:winnr(1) . '%#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# LayerManager %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'SpaceVimPlugManager'
return '%#SpaceVim_statusline_a#' . s:winnr(1) . '%#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# PlugManager %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'SpaceVimTabsManager'
return '%#SpaceVim_statusline_a#' . s:winnr(1) . '%#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# TabsManager %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
elseif &filetype ==# 'denite'
return '%#SpaceVim_statusline_a_bold# %{SpaceVim#layers#core#statusline#denite_mode()} '
\ . '%#SpaceVim_statusline_a_bold_SpaceVim_statusline_b#' . s:lsep . ' '
\ . '%#SpaceVim_statusline_b#%{denite#get_status_sources()} %#SpaceVim_statusline_b_SpaceVim_statusline_z#' . s:lsep . ' '
\ . '%#SpaceVim_statusline_z#%=%#SpaceVim_statusline_c_SpaceVim_statusline_z#' . s:rsep
\ . '%#SpaceVim_statusline_c# %{denite#get_status_path() . denite#get_status_linenr()}'
elseif &filetype ==# 'unite'
return '%#SpaceVim_statusline_a_bold#%{SpaceVim#layers#core#statusline#unite_mode()} Unite '
\ . '%#SpaceVim_statusline_a_bold_SpaceVim_statusline_b#' . s:lsep . ' %{get(unite#get_context(), "buffer_name", "")} '
\ . '%#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' '
\ . '%#SpaceVim_statusline_c# %{unite#get_status_string()} '
elseif &filetype ==# 'SpaceVimFlyGrep'
return '%#SpaceVim_statusline_a# FlyGrep %#SpaceVim_statusline_a_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# %{getcwd()}%#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep
\ . '%#SpaceVim_statusline_c# %{SpaceVim#plugins#flygrep#lineNr()}'
elseif &filetype ==# 'TransientState'
return '%#SpaceVim_statusline_a# Transient State %#SpaceVim_statusline_a_SpaceVim_statusline_b#'
elseif &filetype ==# 'HelpDescribe'
return '%#SpaceVim_statusline_a# HelpDescribe %#SpaceVim_statusline_a_SpaceVim_statusline_b#'
endif
if a:0 > 0
return s:active()
else
return s:inactive()
endif
endfunction
function! s:active() abort
let lsec = [s:winnr(), s:filename()]
if index(s:loaded_sections, 'search status') != -1
call add(lsec, s:search_status())
endif
if index(s:loaded_sections, 'major mode') != -1 && !empty(&filetype)
call add(lsec, ' ' . &filetype . ' ')
endif
let rsec = []
if index(s:loaded_sections, 'syntax checking') != -1 && s:syntax_checking() != ''
call add(lsec, s:syntax_checking())
endif
let lsec = [s:winnr(), s:filename()]
if index(s:loaded_sections, 'search status') != -1
call add(lsec, s:search_status())
endif
if index(s:loaded_sections, 'major mode') != -1 && !empty(&filetype)
call add(lsec, ' ' . &filetype . ' ')
endif
let rsec = []
if index(s:loaded_sections, 'syntax checking') != -1 && s:syntax_checking() != ''
call add(lsec, s:syntax_checking())
endif
if index(s:loaded_sections, 'minor mode lighters') != -1
call add(lsec, s:modes())
endif
if index(s:loaded_sections, 'version control info') != -1
call add(lsec, s:git_branch())
endif
call add(lsec, SpaceVim#plugins#searcher#count())
if index(s:loaded_sections, 'battery status') != -1
call add(rsec, s:battery_status())
endif
call add(rsec, '%{" " . &ff . " | " . (&fenc!=""?&fenc:&enc) . " "}')
if index(s:loaded_sections, 'cursorpos') != -1
call add(rsec, s:cursorpos())
endif
call add(rsec, ' %P ')
if index(s:loaded_sections, 'time') != -1
call add(rsec, s:time())
endif
if index(s:loaded_sections, 'minor mode lighters') != -1
call add(lsec, s:modes())
endif
if index(s:loaded_sections, 'version control info') != -1
call add(lsec, s:git_branch())
endif
call add(lsec, SpaceVim#plugins#searcher#count())
if index(s:loaded_sections, 'battery status') != -1
call add(rsec, s:battery_status())
endif
call add(rsec, '%{" " . &ff . " | " . (&fenc!=""?&fenc:&enc) . " "}')
if index(s:loaded_sections, 'cursorpos') != -1
call add(rsec, s:cursorpos())
endif
call add(rsec, ' %P ')
if index(s:loaded_sections, 'time') != -1
call add(rsec, s:time())
endif
if index(s:loaded_sections, 'whitespace') != -1
call add(rsec, s:whitespace())
endif
return s:STATUSLINE.build(lsec, rsec, s:lsep, s:rsep,
\ 'SpaceVim_statusline_a', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
if index(s:loaded_sections, 'whitespace') != -1
call add(rsec, s:whitespace())
endif
return s:STATUSLINE.build(lsec, rsec, s:lsep, s:rsep,
\ 'SpaceVim_statusline_a', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
function! s:inactive() abort
return '%#SpaceVim_statusline_ia#' . s:winnr() . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b#' . s:filename() . s:ilsep
\ . ' ' . &filetype . ' ' . s:ilsep
\ . s:modes() . s:ilsep
\ . s:git_branch() . s:ilsep
\ . ' %='
\ . s:irsep . '%{" " . &ff . "|" . (&fenc!=""?&fenc:&enc) . " "}'
\ . s:irsep . ' %P '
return '%#SpaceVim_statusline_ia#' . s:winnr() . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b#' . s:filename() . s:ilsep
\ . ' ' . &filetype . ' ' . s:ilsep
\ . s:modes() . s:ilsep
\ . s:git_branch() . s:ilsep
\ . ' %='
\ . s:irsep . '%{" " . &ff . "|" . (&fenc!=""?&fenc:&enc) . " "}'
\ . s:irsep . ' %P '
endfunction
function! s:gitgutter() abort
if exists('b:gitgutter_summary')
let l:summary = get(b:, 'gitgutter_summary')
if l:summary[0] != 0 || l:summary[1] != 0 || l:summary[2] != 0
return ' +'.l:summary[0].' ~'.l:summary[1].' -'.l:summary[2].' '
endif
if exists('b:gitgutter_summary')
let l:summary = get(b:, 'gitgutter_summary')
if l:summary[0] != 0 || l:summary[1] != 0 || l:summary[2] != 0
return ' +'.l:summary[0].' ~'.l:summary[1].' -'.l:summary[2].' '
endif
return ''
endif
return ''
endfunction
function! SpaceVim#layers#core#statusline#init() abort
augroup SpaceVim_statusline
autocmd!
autocmd BufWinEnter,WinEnter,FileType
\ * let &l:statusline = SpaceVim#layers#core#statusline#get(1)
autocmd BufWinLeave,WinLeave * let &l:statusline = SpaceVim#layers#core#statusline#get()
autocmd ColorScheme * call SpaceVim#layers#core#statusline#def_colors()
augroup END
augroup SpaceVim_statusline
autocmd!
autocmd BufWinEnter,WinEnter,FileType
\ * let &l:statusline = SpaceVim#layers#core#statusline#get(1)
autocmd BufWinLeave,WinLeave * let &l:statusline = SpaceVim#layers#core#statusline#get()
autocmd ColorScheme * call SpaceVim#layers#core#statusline#def_colors()
augroup END
endfunction
let s:colors_template = SpaceVim#mapping#guide#theme#gruvbox#palette()
function! SpaceVim#layers#core#statusline#def_colors() abort
let name = get(g:, 'colors_name', 'gruvbox')
try
let t = SpaceVim#mapping#guide#theme#{name}#palette()
catch /^Vim\%((\a\+)\)\=:E117/
let t = SpaceVim#mapping#guide#theme#gruvbox#palette()
endtry
let s:colors_template = t
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
exe 'hi! SpaceVim_statusline_ia ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
exe 'hi! SpaceVim_statusline_b ctermbg=' . t[1][2] . ' ctermfg=' . t[1][3] . ' guibg=' . t[1][1] . ' guifg=' . t[1][0]
exe 'hi! SpaceVim_statusline_c ctermbg=' . t[2][2] . ' ctermfg=' . t[2][3] . ' guibg=' . t[2][1] . ' guifg=' . t[2][0]
exe 'hi! SpaceVim_statusline_z ctermbg=' . t[3][1] . ' ctermfg=' . t[3][1] . ' guibg=' . t[3][0] . ' guifg=' . t[3][0]
hi! SpaceVim_statusline_error ctermbg=003 ctermfg=Black guibg=#504945 guifg=#fb4934 gui=bold
hi! SpaceVim_statusline_warn ctermbg=003 ctermfg=Black guibg=#504945 guifg=#fabd2f gui=bold
call s:HI.hi_separator('SpaceVim_statusline_a', 'SpaceVim_statusline_b')
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
call s:HI.hi_separator('SpaceVim_statusline_ia', 'SpaceVim_statusline_b')
call s:HI.hi_separator('SpaceVim_statusline_b', 'SpaceVim_statusline_c')
call s:HI.hi_separator('SpaceVim_statusline_b', 'SpaceVim_statusline_z')
call s:HI.hi_separator('SpaceVim_statusline_c', 'SpaceVim_statusline_z')
let name = get(g:, 'colors_name', 'gruvbox')
try
let t = SpaceVim#mapping#guide#theme#{name}#palette()
catch /^Vim\%((\a\+)\)\=:E117/
let t = SpaceVim#mapping#guide#theme#gruvbox#palette()
endtry
let s:colors_template = t
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
exe 'hi! SpaceVim_statusline_ia ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
exe 'hi! SpaceVim_statusline_b ctermbg=' . t[1][2] . ' ctermfg=' . t[1][3] . ' guibg=' . t[1][1] . ' guifg=' . t[1][0]
exe 'hi! SpaceVim_statusline_c ctermbg=' . t[2][2] . ' ctermfg=' . t[2][3] . ' guibg=' . t[2][1] . ' guifg=' . t[2][0]
exe 'hi! SpaceVim_statusline_z ctermbg=' . t[3][1] . ' ctermfg=' . t[3][1] . ' guibg=' . t[3][0] . ' guifg=' . t[3][0]
hi! SpaceVim_statusline_error ctermbg=003 ctermfg=Black guibg=#504945 guifg=#fb4934 gui=bold
hi! SpaceVim_statusline_warn ctermbg=003 ctermfg=Black guibg=#504945 guifg=#fabd2f gui=bold
call s:HI.hi_separator('SpaceVim_statusline_a', 'SpaceVim_statusline_b')
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
call s:HI.hi_separator('SpaceVim_statusline_ia', 'SpaceVim_statusline_b')
call s:HI.hi_separator('SpaceVim_statusline_b', 'SpaceVim_statusline_c')
call s:HI.hi_separator('SpaceVim_statusline_b', 'SpaceVim_statusline_z')
call s:HI.hi_separator('SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
function! SpaceVim#layers#core#statusline#toggle_mode(name) abort
if index(s:loaded_modes, a:name) != -1
call remove(s:loaded_modes, index(s:loaded_modes, a:name))
else
call add(s:loaded_modes, a:name)
endif
let &l:statusline = SpaceVim#layers#core#statusline#get(1)
if index(s:loaded_modes, a:name) != -1
call remove(s:loaded_modes, index(s:loaded_modes, a:name))
else
call add(s:loaded_modes, a:name)
endif
let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endfunction
function! SpaceVim#layers#core#statusline#toggle_section(name) abort
if index(s:loaded_sections, a:name) != -1
call remove(s:loaded_sections, index(s:loaded_sections, a:name))
else
call add(s:loaded_sections, a:name)
endif
let &l:statusline = SpaceVim#layers#core#statusline#get(1)
if index(s:loaded_sections, a:name) != -1
call remove(s:loaded_sections, index(s:loaded_sections, a:name))
else
call add(s:loaded_sections, a:name)
endif
let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endfunction
function! SpaceVim#layers#core#statusline#rsep()
return get(s:separators, g:spacevim_statusline_separator, s:separators['arrow'])
return get(s:separators, g:spacevim_statusline_separator, s:separators['arrow'])
endfunction
function! SpaceVim#layers#core#statusline#config() abort
let [s:lsep , s:rsep] = get(s:separators, g:spacevim_statusline_separator, s:separators['arrow'])
let [s:ilsep , s:irsep] = get(s:i_separators, g:spacevim_statusline_inactive_separator, s:i_separators['arrow'])
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'm'], 'call SpaceVim#layers#core#statusline#toggle_section("minor mode lighters")',
\ 'toggle the minor mode lighters', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'v'], 'call SpaceVim#layers#core#statusline#toggle_section("version control info")',
\ 'version control info', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'M'], 'call SpaceVim#layers#core#statusline#toggle_section("major mode")',
\ 'toggle the major mode', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'b'], 'call SpaceVim#layers#core#statusline#toggle_section("battery status")',
\ 'toggle the battery status', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 't'], 'call SpaceVim#layers#core#statusline#toggle_section("time")',
\ 'toggle the time', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'p'], 'call SpaceVim#layers#core#statusline#toggle_section("cursorpos")',
\ 'toggle the cursor position', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'T'], 'if &laststatus == 2 | let &laststatus = 0 | else | let &laststatus = 2 | endif',
\ 'toggle the statuline itself', 1)
function! TagbarStatusline(...) abort
let name = (strwidth(a:3) > (g:spacevim_sidebar_width - 15)) ? a:3[:g:spacevim_sidebar_width - 20] . '..' : a:3
return s:STATUSLINE.build([s:winnr(),' Tagbar ', ' ' . name . ' '], [], s:lsep, s:rsep,
\ 'SpaceVim_statusline_ia', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
let g:tagbar_status_func = 'TagbarStatusline'
let g:unite_force_overwrite_statusline = 0
let [s:lsep , s:rsep] = get(s:separators, g:spacevim_statusline_separator, s:separators['arrow'])
let [s:ilsep , s:irsep] = get(s:i_separators, g:spacevim_statusline_inactive_separator, s:i_separators['arrow'])
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'm'], 'call SpaceVim#layers#core#statusline#toggle_section("minor mode lighters")',
\ 'toggle the minor mode lighters', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'v'], 'call SpaceVim#layers#core#statusline#toggle_section("version control info")',
\ 'version control info', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'M'], 'call SpaceVim#layers#core#statusline#toggle_section("major mode")',
\ 'toggle the major mode', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'b'], 'call SpaceVim#layers#core#statusline#toggle_section("battery status")',
\ 'toggle the battery status', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 't'], 'call SpaceVim#layers#core#statusline#toggle_section("time")',
\ 'toggle the time', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'p'], 'call SpaceVim#layers#core#statusline#toggle_section("cursorpos")',
\ 'toggle the cursor position', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'm', 'T'], 'if &laststatus == 2 | let &laststatus = 0 | else | let &laststatus = 2 | endif',
\ 'toggle the statuline itself', 1)
function! TagbarStatusline(...) abort
let name = (strwidth(a:3) > (g:spacevim_sidebar_width - 15)) ? a:3[:g:spacevim_sidebar_width - 20] . '..' : a:3
return s:STATUSLINE.build([s:winnr(),' Tagbar ', ' ' . name . ' '], [], s:lsep, s:rsep,
\ 'SpaceVim_statusline_ia', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
let g:tagbar_status_func = 'TagbarStatusline'
let g:unite_force_overwrite_statusline = 0
let g:ctrlp_status_func = {
\ 'main': 'SpaceVim#layers#core#statusline#ctrlp',
\ 'prog': 'SpaceVim#layers#core#statusline#ctrlp_status',
\ }
endfunction
" Arguments:
" |
" +- a:focus : The focus of the prompt: "prt" or "win".
" |
" +- a:byfname : In filename mode or in full path mode: "file" or "path".
" |
" +- a:regex : In regex mode: 1 or 0.
" |
" +- a:prev : The previous search mode.
" |
" +- a:item : The current search mode.
" |
" +- a:next : The next search mode.
" |
" +- a:marked : The number of marked files, or a comma separated list of
" the marked filenames.
function! SpaceVim#layers#core#statusline#ctrlp(focus, byfname, regex, prev, item, next, marked) abort
return s:STATUSLINE.build([' Ctrlp ', ' ' . a:prev . ' ', ' ' . a:item . ' ', ' ' . a:next . ' '],
\ [' ' . a:focus . ' ', ' ' . a:byfname . ' ', ' ' . getcwd() . ' '], s:lsep, s:rsep,
\ 'SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
" a:str : Either the number of files scanned so far, or a string indicating
" the current directory is being scanned with a user_command.
function! SpaceVim#layers#core#statusline#ctrlp_status(str) abort
return s:STATUSLINE.build([' Ctrlp ', ' ' . a:str . ' '],
\ [' ' . getcwd() . ' '], s:lsep, s:rsep,
\ 'SpaceVim_statusline_a', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
function! SpaceVim#layers#core#statusline#jump(i) abort
if winnr('$') >= a:i
exe a:i . 'wincmd w'
endif
if winnr('$') >= a:i
exe a:i . 'wincmd w'
endif
endfunction
function! SpaceVim#layers#core#statusline#mode(mode)
let t = s:colors_template
if get(w:, 'spacevim_statusline_mode', '') != a:mode
if a:mode == 'n'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
elseif a:mode == 'i'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
elseif a:mode == 'R'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[6][3] . ' ctermfg=' . t[6][2] . ' guibg=' . t[6][1] . ' guifg=' . t[6][0]
elseif a:mode == 'v' || a:mode == 'V' || a:mode == '^V' || a:mode == 's' || a:mode == 'S' || a:mode == '^S'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[5][3] . ' ctermfg=' . t[5][2] . ' guibg=' . t[5][1] . ' guifg=' . t[5][0]
endif
call s:HI.hi_separator('SpaceVim_statusline_a', 'SpaceVim_statusline_b')
let w:spacevim_statusline_mode = a:mode
let t = s:colors_template
if get(w:, 'spacevim_statusline_mode', '') != a:mode
if a:mode == 'n'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
elseif a:mode == 'i'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
elseif a:mode == 'R'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[6][3] . ' ctermfg=' . t[6][2] . ' guibg=' . t[6][1] . ' guifg=' . t[6][0]
elseif a:mode == 'v' || a:mode == 'V' || a:mode == '^V' || a:mode == 's' || a:mode == 'S' || a:mode == '^S'
exe 'hi! SpaceVim_statusline_a ctermbg=' . t[5][3] . ' ctermfg=' . t[5][2] . ' guibg=' . t[5][1] . ' guifg=' . t[5][0]
endif
return ''
call s:HI.hi_separator('SpaceVim_statusline_a', 'SpaceVim_statusline_b')
let w:spacevim_statusline_mode = a:mode
endif
return ''
endfunction
function! SpaceVim#layers#core#statusline#denite_mode()
let t = s:colors_template
let dmode = split(denite#get_status_mode())[1]
if get(w:, 'spacevim_statusline_mode', '') != dmode
if dmode == 'NORMAL'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
elseif dmode == 'INSERT'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
endif
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
let w:spacevim_statusline_mode = dmode
let t = s:colors_template
let dmode = split(denite#get_status_mode())[1]
if get(w:, 'spacevim_statusline_mode', '') != dmode
if dmode == 'NORMAL'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
elseif dmode == 'INSERT'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
endif
return dmode
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
let w:spacevim_statusline_mode = dmode
endif
return dmode
endfunction
function! SpaceVim#layers#core#statusline#unite_mode()
let t = s:colors_template
let dmode = mode()
if get(w:, 'spacevim_statusline_mode', '') != dmode
if dmode == 'n'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
elseif dmode == 'i'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
endif
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
let w:spacevim_statusline_mode = dmode
let t = s:colors_template
let dmode = mode()
if get(w:, 'spacevim_statusline_mode', '') != dmode
if dmode == 'n'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
elseif dmode == 'i'
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
endif
return ''
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
let w:spacevim_statusline_mode = dmode
endif
return ''
endfunction
" vim:set et sw=2 cc=80:

View File

@ -1,4 +1,6 @@
let g:Config_Main_Home = fnamemodify(expand('<sfile>'), ':p:h:gs?\\?'.((has('win16') || has('win32') || has('win64'))?'\':'/') . '?')
let g:Config_Main_Home = fnamemodify(expand('<sfile>'),
\ ':p:h:gs?\\?'.((has('win16') || has('win32')
\ || has('win64'))?'\':'/') . '?')
" [dir?, path]
@ -58,3 +60,5 @@ endif
call zvim#util#source_rc('commands.vim')
filetype plugin indent on
syntax on
" vim:set et sw=2 cc=80:

View File

@ -6,131 +6,131 @@ title: "Documentation"
<!-- vim-markdown-toc GFM -->
* [Core Pillars](#core-pillars)
* [Mnemonic](#mnemonic)
* [Discoverable](#discoverable)
* [Consistent](#consistent)
* [Crowd-Configured](#crowd-configured)
* [Mnemonic](#mnemonic)
* [Discoverable](#discoverable)
* [Consistent](#consistent)
* [Crowd-Configured](#crowd-configured)
* [Highlighted features](#highlighted-features)
* [Screenshots](#screenshots)
* [welcome page](#welcome-page)
* [working flow](#working-flow)
* [welcome page](#welcome-page)
* [working flow](#working-flow)
* [Who can benefit from this?](#who-can-benefit-from-this)
* [Update and Rollback](#update-and-rollback)
* [Update SpaceVim itself](#update-spacevim-itself)
* [Automatic Updates](#automatic-updates)
* [Updating from the SpaceVim Buffer](#updating-from-the-spacevim-buffer)
* [Updating Manually with git](#updating-manually-with-git)
* [Update plugins](#update-plugins)
* [Update SpaceVim itself](#update-spacevim-itself)
* [Automatic Updates](#automatic-updates)
* [Updating from the SpaceVim Buffer](#updating-from-the-spacevim-buffer)
* [Updating Manually with git](#updating-manually-with-git)
* [Update plugins](#update-plugins)
* [Configuration layers](#configuration-layers)
* [Custom Configuration](#custom-configuration)
* [Automatic Generation](#automatic-generation)
* [Alternative directory](#alternative-directory)
* [Automatic Generation](#automatic-generation)
* [Alternative directory](#alternative-directory)
* [Concepts](#concepts)
* [Transient-states](#transient-states)
* [Transient-states](#transient-states)
* [Awesome ui](#awesome-ui)
* [Colorschemes](#colorschemes)
* [Font](#font)
* [UI Toggles](#ui-toggles)
* [Statusline && tabline](#statusline--tabline)
* [statusline](#statusline)
* [tabline](#tabline)
* [Colorschemes](#colorschemes)
* [Font](#font)
* [UI Toggles](#ui-toggles)
* [Statusline && tabline](#statusline--tabline)
* [statusline](#statusline)
* [tabline](#tabline)
* [Manual](#manual)
* [Completion](#completion)
* [Unite/Denite](#unitedenite)
* [Mappings within unite/denite buffer](#mappings-within-unitedenite-buffer)
* [Discovering](#discovering)
* [Mappings](#mappings)
* [Mappings guide](#mappings-guide)
* [Unide/Denite describe key bindings](#unidedenite-describe-key-bindings)
* [Getting help](#getting-help)
* [Available layers](#available-layers)
* [Available plugins in SpaceVim](#available-plugins-in-spacevim)
* [New packages from ELPA repositories](#new-packages-from-elpa-repositories)
* [Toggles](#toggles)
* [Navigating](#navigating)
* [Point/Cursor](#pointcursor)
* [Vim motions with vim-easymotion](#vim-motions-with-vim-easymotion)
* [quick-jump-link mode (TODO)](#quick-jump-link-mode-todo)
* [Unimpaired bindings](#unimpaired-bindings)
* [Jumping, Joining and Splitting](#jumping-joining-and-splitting)
* [Jumping](#jumping)
* [Joining and splitting](#joining-and-splitting)
* [Window manipulation](#window-manipulation)
* [Window manipulation key bindings](#window-manipulation-key-bindings)
* [Buffers and Files](#buffers-and-files)
* [Buffers manipulation key bindings](#buffers-manipulation-key-bindings)
* [Create a new empty buffer](#create-a-new-empty-buffer)
* [Special Buffers](#special-buffers)
* [Files manipulations key bindings](#files-manipulations-key-bindings)
* [Vim and SpaceVim files](#vim-and-spacevim-files)
* [File tree](#file-tree)
* [File tree navigation](#file-tree-navigation)
* [Open file with file tree.](#open-file-with-file-tree)
* [Commands starting with `g`](#commands-starting-with-g)
* [Commands starting with `z`](#commands-starting-with-z)
* [Auto-saving](#auto-saving)
* [Searching](#searching)
* [With an external tool](#with-an-external-tool)
* [Useful key bindings](#useful-key-bindings)
* [Searching in current file](#searching-in-current-file)
* [Searching in all loaded buffers](#searching-in-all-loaded-buffers)
* [Searching in an arbitrary directory](#searching-in-an-arbitrary-directory)
* [Searching in a project](#searching-in-a-project)
* [Background searching in a project](#background-searching-in-a-project)
* [Searching the web](#searching-the-web)
* [Searching on the fly](#searching-on-the-fly)
* [Persistent highlighting](#persistent-highlighting)
* [Editing](#editing)
* [Paste text](#paste-text)
* [Auto-indent pasted text](#auto-indent-pasted-text)
* [Text manipulation commands](#text-manipulation-commands)
* [Text insertion commands](#text-insertion-commands)
* [Commenting](#commenting)
* [Multi-Encodings](#multi-encodings)
* [Errors handling](#errors-handling)
* [Managing projects](#managing-projects)
* [Completion](#completion)
* [Unite/Denite](#unitedenite)
* [Mappings within unite/denite buffer](#mappings-within-unitedenite-buffer)
* [Discovering](#discovering)
* [Mappings](#mappings)
* [Mappings guide](#mappings-guide)
* [Unide/Denite describe key bindings](#unidedenite-describe-key-bindings)
* [Getting help](#getting-help)
* [Available layers](#available-layers)
* [Available plugins in SpaceVim](#available-plugins-in-spacevim)
* [New packages from ELPA repositories](#new-packages-from-elpa-repositories)
* [Toggles](#toggles)
* [Navigating](#navigating)
* [Point/Cursor](#pointcursor)
* [Vim motions with vim-easymotion](#vim-motions-with-vim-easymotion)
* [quick-jump-link mode (TODO)](#quick-jump-link-mode-todo)
* [Unimpaired bindings](#unimpaired-bindings)
* [Jumping, Joining and Splitting](#jumping-joining-and-splitting)
* [Jumping](#jumping)
* [Joining and splitting](#joining-and-splitting)
* [Window manipulation](#window-manipulation)
* [Window manipulation key bindings](#window-manipulation-key-bindings)
* [Buffers and Files](#buffers-and-files)
* [Buffers manipulation key bindings](#buffers-manipulation-key-bindings)
* [Create a new empty buffer](#create-a-new-empty-buffer)
* [Special Buffers](#special-buffers)
* [Files manipulations key bindings](#files-manipulations-key-bindings)
* [Vim and SpaceVim files](#vim-and-spacevim-files)
* [File tree](#file-tree)
* [File tree navigation](#file-tree-navigation)
* [Open file with file tree.](#open-file-with-file-tree)
* [Commands starting with `g`](#commands-starting-with-g)
* [Commands starting with `z`](#commands-starting-with-z)
* [Auto-saving](#auto-saving)
* [Searching](#searching)
* [With an external tool](#with-an-external-tool)
* [Useful key bindings](#useful-key-bindings)
* [Searching in current file](#searching-in-current-file)
* [Searching in all loaded buffers](#searching-in-all-loaded-buffers)
* [Searching in an arbitrary directory](#searching-in-an-arbitrary-directory)
* [Searching in a project](#searching-in-a-project)
* [Background searching in a project](#background-searching-in-a-project)
* [Searching the web](#searching-the-web)
* [Searching on the fly](#searching-on-the-fly)
* [Persistent highlighting](#persistent-highlighting)
* [Editing](#editing)
* [Paste text](#paste-text)
* [Auto-indent pasted text](#auto-indent-pasted-text)
* [Text manipulation commands](#text-manipulation-commands)
* [Text insertion commands](#text-insertion-commands)
* [Commenting](#commenting)
* [Multi-Encodings](#multi-encodings)
* [Errors handling](#errors-handling)
* [Managing projects](#managing-projects)
* [Achievements](#achievements)
* [issues](#issues)
* [Stars, forks and watchers](#stars-forks-and-watchers)
* [issues](#issues)
* [Stars, forks and watchers](#stars-forks-and-watchers)
* [Features](#features)
* [Awesome ui](#awesome-ui-1)
* [Mnemonic key bindings](#mnemonic-key-bindings)
* [Awesome ui](#awesome-ui-1)
* [Mnemonic key bindings](#mnemonic-key-bindings)
* [Language specific mode](#language-specific-mode)
* [Key Mapping](#key-mapping)
* [c/c++ support](#cc-support)
* [go support](#go-support)
* [python support](#python-support)
* [c/c++ support](#cc-support)
* [go support](#go-support)
* [python support](#python-support)
* [Neovim centric - Dark powered mode of SpaceVim.](#neovim-centric---dark-powered-mode-of-spacevim)
* [Modular configuration](#modular-configuration)
* [Multiple leader mode](#multiple-leader-mode)
* [Global origin vim leader](#global-origin-vim-leader)
* [Local origin vim leader](#local-origin-vim-leader)
* [Windows function leader](#windows-function-leader)
* [Unite work flow leader](#unite-work-flow-leader)
* [Global origin vim leader](#global-origin-vim-leader)
* [Local origin vim leader](#local-origin-vim-leader)
* [Windows function leader](#windows-function-leader)
* [Unite work flow leader](#unite-work-flow-leader)
* [Unite centric work-flow](#unite-centric-work-flow)
* [Plugin Highlights](#plugin-highlights)
* [Non Lazy-Loaded Plugins](#non-lazy-loaded-plugins)
* [Lazy-Loaded Plugins](#lazy-loaded-plugins)
* [Language](#language)
* [Commands](#commands)
* [Commands](#commands-1)
* [Completion](#completion-1)
* [Unite](#unite)
* [Operators & Text Objects](#operators--text-objects)
* [Custom Key bindings](#custom-key-bindings)
* [File Operations](#file-operations)
* [Editor UI](#editor-ui)
* [Window Management](#window-management)
* [Native functions](#native-functions)
* [Plugin: Unite](#plugin-unite)
* [Plugin: neocomplete](#plugin-neocomplete)
* [Plugin: NERD Commenter](#plugin-nerd-commenter)
* [Plugin: Goyo and Limelight](#plugin-goyo-and-limelight)
* [Plugin: ChooseWin](#plugin-choosewin)
* [Plugin: Bookmarks](#plugin-bookmarks)
* [Plugin: Gina/Gita](#plugin-ginagita)
* [Plugin: vim-signify](#plugin-vim-signify)
* [Misc Plugins](#misc-plugins)
* [Plugin Highlights](#plugin-highlights)
* [Non Lazy-Loaded Plugins](#non-lazy-loaded-plugins)
* [Lazy-Loaded Plugins](#lazy-loaded-plugins)
* [Language](#language)
* [Commands](#commands)
* [Commands](#commands-1)
* [Completion](#completion-1)
* [Unite](#unite)
* [Operators & Text Objects](#operators--text-objects)
* [Custom Key bindings](#custom-key-bindings)
* [File Operations](#file-operations)
* [Editor UI](#editor-ui)
* [Window Management](#window-management)
* [Native functions](#native-functions)
* [Plugin: Unite](#plugin-unite)
* [Plugin: neocomplete](#plugin-neocomplete)
* [Plugin: NERD Commenter](#plugin-nerd-commenter)
* [Plugin: Goyo and Limelight](#plugin-goyo-and-limelight)
* [Plugin: ChooseWin](#plugin-choosewin)
* [Plugin: Bookmarks](#plugin-bookmarks)
* [Plugin: Gina/Gita](#plugin-ginagita)
* [Plugin: vim-signify](#plugin-vim-signify)
* [Misc Plugins](#misc-plugins)
<!-- vim-markdown-toc -->
@ -847,7 +847,7 @@ SpaceVim use vimfiler as the default file tree, and the default key binding is `
let g:spacevim_filemanager = 'nerdtree'
```
VCS integration is supported, there will be a colum status, this feature maybe make vimfiler slow, so it is not enabled by default. to enable this feature, add `let g:spacevim_enable_vimfiler_gitstatus = 1` to your custom config. here is any picture for this feature:
VCS integration is supported, there will be a column status, this feature maybe make vimfiler slow, so it is not enabled by default. to enable this feature, add `let g:spacevim_enable_vimfiler_gitstatus = 1` to your custom config. here is any picture for this feature:
![file-tree](https://user-images.githubusercontent.com/13142418/26881817-279225b2-4bcb-11e7-8872-7e4bd3d1c84e.png)
@ -887,8 +887,6 @@ If there is only one file buffer opened, a file is opened in the active window,
| `sg` | open file in an vertically split window |
| `sv` | open file in an horizontally split window |
&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
### Commands starting with `g`
after pressing prefix `g` in normal mode, if you do not remember the mappings, you will see the guide which will tell you the functional of all mappings starting with `g`.