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

Fix g:spacevim_windows_index_type

This commit is contained in:
wsdjeg 2017-09-20 21:24:57 +08:00
parent 6ceea6e48f
commit a6333fb3fc
3 changed files with 18 additions and 8 deletions

View File

@ -272,6 +272,7 @@ let g:spacevim_buffer_index_type = 0
" " 0: 1 ➛ ➊
" " 1: 1 ➛ ➀
" " 2: 1 ➛ ⓵
" " 3: 1 ➛ 1
" let g:spacevim_windows_index_type = 1
" <
let g:spacevim_windows_index_type = 0

View File

@ -132,9 +132,17 @@ endif
function! s:winnr(...) abort
if a:0 > 1
return ' ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
if g:spacevim_windows_index_type == 3
return ' ' . winnr() . ' '
else
return ' ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
endif
else
return '%{SpaceVim#layers#core#statusline#mode(mode())} ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
if g:spacevim_windows_index_type == 3
return '%{SpaceVim#layers#core#statusline#mode(mode())} ' . winnr() . ' '
else
return '%{SpaceVim#layers#core#statusline#mode(mode())} ' . s:MESSLETTERS.circled_num(winnr(), g:spacevim_windows_index_type) . ' '
endif
endif
endfunction
@ -406,17 +414,17 @@ endfunction
" +- 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')
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')
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

View File

@ -303,6 +303,7 @@ Set SpaceVim windows index type, default is 0.
" 0: 1 ➛ ➊
" 1: 1 ➛ ➀
" 2: 1 ➛ ⓵
" 3: 1 ➛ 1
let g:spacevim_windows_index_type = 1
<