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

Better deafult (#2865)

* Change default windows index type

* Chaneg option enable_tabline_filetype_icon

change enable_tabline_filetype_icon to enable_tabline_ft_icon

* Disable true colors by default

* Changes default buffer_index_type to 4

* Change default statusline sep
This commit is contained in:
Wang Shidong 2019-06-02 11:59:43 +08:00 committed by GitHub
parent dc713a3725
commit 805c1c3f34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 154 additions and 73 deletions

View File

@ -71,7 +71,7 @@ Here is an example for using toml as SpaceVim config:
statusline_inactive_separator = "bar" statusline_inactive_separator = "bar"
buffer_index_type = 4 buffer_index_type = 4
windows_index_type = 3 windows_index_type = 3
enable_tabline_filetype_icon = false enable_tabline_ft_icon = false
enable_statusline_mode = false enable_statusline_mode = false
statusline_unicode_symbols = false statusline_unicode_symbols = false
# Enable Vim compatible mode, avoid changing origin Vim key bindings # Enable Vim compatible mode, avoid changing origin Vim key bindings

View File

@ -124,17 +124,17 @@ let g:spacevim_home_files_number = 6
"" ""
" @section enable_guicolors, options-enable_guicolors " @section enable_guicolors, options-enable_guicolors
" @parentsection options " @parentsection options
" Enable true color support in terminal. Default is true. " Enable true color support in terminal. Default is false.
" > " >
" enable_guicolors = true " enable_guicolors = true
" < " <
"" ""
" Enable true color support in terminal. Default is 1. " Enable true color support in terminal. Default is 0.
" > " >
" let g:spacevim_enable_guicolors = 1 " let g:spacevim_enable_guicolors = 1
" < " <
let g:spacevim_enable_guicolors = 1 let g:spacevim_enable_guicolors = 0
"" ""
" @section enable_googlesuggest, options-enable_googlesuggest " @section enable_googlesuggest, options-enable_googlesuggest
@ -385,7 +385,7 @@ let g:spacevim_enable_cursorline = 1
"" ""
" @section statusline_separator, options-statusline_separator " @section statusline_separator, options-statusline_separator
" @parentsection options " @parentsection options
" Set the statusline separators of statusline, default is 'arrow' " Set the statusline separators of statusline, default is 'nil'
" > " >
" Separators options: " Separators options:
" 1. arrow " 1. arrow
@ -399,7 +399,7 @@ let g:spacevim_enable_cursorline = 1
" "
"" ""
" Set the statusline separators of statusline, default is 'arrow' " Set the statusline separators of statusline, default is 'nil'
" > " >
" Separators options: " Separators options:
" 1. arrow " 1. arrow
@ -411,12 +411,12 @@ let g:spacevim_enable_cursorline = 1
" "
" See more details in: http://spacevim.org/documentation/#statusline " See more details in: http://spacevim.org/documentation/#statusline
" "
let g:spacevim_statusline_separator = 'arrow' let g:spacevim_statusline_separator = 'nil'
"" ""
" @section statusline_iseparator, options-statusline_iseparator " @section statusline_iseparator, options-statusline_iseparator
" @parentsection options " @parentsection options
" Set the statusline separators of statusline in inactive windows, default is " Set the statusline separators of statusline in inactive windows, default is
" 'arrow' " 'nil'
" > " >
" Separators options: " Separators options:
" 1. arrow " 1. arrow
@ -431,7 +431,7 @@ let g:spacevim_statusline_separator = 'arrow'
"" ""
" Set the statusline separators of statusline in inactive windows, default is " Set the statusline separators of statusline in inactive windows, default is
" 'arrow' " 'nil'
" > " >
" Separators options: " Separators options:
" 1. arrow " 1. arrow
@ -443,7 +443,7 @@ let g:spacevim_statusline_separator = 'arrow'
" "
" See more details in: http://spacevim.org/documentation/#statusline " See more details in: http://spacevim.org/documentation/#statusline
" "
let g:spacevim_statusline_iseparator = 'arrow' let g:spacevim_statusline_iseparator = 'nil'
"" ""
" @section enable_statusline_bfpath, options-enable_statusline_bfpath " @section enable_statusline_bfpath, options-enable_statusline_bfpath
@ -802,7 +802,22 @@ let g:spacevim_hiddenfileinfo = 1
let g:spacevim_gitcommit_pr_icon = '' let g:spacevim_gitcommit_pr_icon = ''
let g:spacevim_gitcommit_issue_icon = '' let g:spacevim_gitcommit_issue_icon = ''
"" ""
" Set SpaceVim buffer index type, default is 0. " @section buffer_index_type, options-buffer_index_type
" @parentsection options
" Set SpaceVim buffer index type, default is 4.
" >
" # types:
" # 0: 1 ➛ ➊
" # 1: 1 ➛ ➀
" # 2: 1 ➛ ⓵
" # 3: 1 ➛ ¹
" # 4: 1 ➛ 1
" buffer_index_type = 1
" <
""
" Set SpaceVim buffer index type, default is 4.
" > " >
" " types: " " types:
" " 0: 1 ➛ ➊ " " 0: 1 ➛ ➊
@ -812,9 +827,25 @@ let g:spacevim_gitcommit_issue_icon = ''
" " 4: 1 ➛ 1 " " 4: 1 ➛ 1
" let g:spacevim_buffer_index_type = 1 " let g:spacevim_buffer_index_type = 1
" < " <
let g:spacevim_buffer_index_type = 0 let g:spacevim_buffer_index_type = 4
"" ""
" Set SpaceVim windows index type, default is 0. " @section windows_index_type, options-windows_index_type
" @parentsection options
" Set SpaceVim windows index type, default is 3.
" >
" # types:
" # 0: 1 ➛ ➊
" # 1: 1 ➛ ➀
" # 2: 1 ➛ ⓵
" # 3: 1 ➛ 1
" windows_index_type = 1
" <
""
" Set SpaceVim windows index type, default is 3.
" > " >
" " types: " " types:
" " 0: 1 ➛ ➊ " " 0: 1 ➛ ➊
@ -823,10 +854,20 @@ let g:spacevim_buffer_index_type = 0
" " 3: 1 ➛ 1 " " 3: 1 ➛ 1
" let g:spacevim_windows_index_type = 1 " let g:spacevim_windows_index_type = 1
" < " <
let g:spacevim_windows_index_type = 0 let g:spacevim_windows_index_type = 3
""
" @section enable_tabline_ft_icon, options-enable_tabline_ft_icon
" @parentsection options
" Enable/Disable tabline filetype icon. default is false. To enable this
" feature:
" >
" enable_tabline_ft_icon = true
" <
"" ""
" Enable/Disable tabline filetype icon. default is 0. " Enable/Disable tabline filetype icon. default is 0.
let g:spacevim_enable_tabline_filetype_icon = 0 let g:spacevim_enable_tabline_ft_icon = 0
"" ""
" Enable/Disable os fileformat icon. default is 0. " Enable/Disable os fileformat icon. default is 0.
let g:spacevim_enable_os_fileformat_icon = 0 let g:spacevim_enable_os_fileformat_icon = 0

View File

@ -51,7 +51,7 @@ function! s:tabname(id) abort
let id = s:messletters.bubble_num(a:id, g:spacevim_buffer_index_type) . ' ' let id = s:messletters.bubble_num(a:id, g:spacevim_buffer_index_type) . ' '
endif endif
let fn = fnamemodify(bufname(a:id), ':t') let fn = fnamemodify(bufname(a:id), ':t')
if g:spacevim_enable_tabline_filetype_icon if g:spacevim_enable_tabline_ft_icon || get(g:, 'spacevim_enable_tabline_filetype_icon', 0)
let icon = s:file.fticon(fn) let icon = s:file.fticon(fn)
if !empty(icon) if !empty(icon)
let fn = fn . ' ' . icon let fn = fn . ' ' . icon
@ -116,7 +116,7 @@ function! SpaceVim#layers#core#tabline#get() abort
endif endif
call add(stack, buflist[winnr - 1]) call add(stack, buflist[winnr - 1])
call s:need_show_bfname(stack, buflist[winnr - 1]) call s:need_show_bfname(stack, buflist[winnr - 1])
if g:spacevim_enable_tabline_filetype_icon if g:spacevim_enable_tabline_ft_icon || get(g:, 'spacevim_enable_tabline_filetype_icon', 0)
let icon = s:file.fticon(name) let icon = s:file.fticon(name)
if !empty(icon) if !empty(icon)
let name = name . ' ' . icon let name = name . ' ' . icon
@ -184,7 +184,7 @@ function! SpaceVim#layers#core#tabline#get() abort
else else
let id = s:messletters.circled_num(index(s:buffers, i) + 1, g:spacevim_buffer_index_type) let id = s:messletters.circled_num(index(s:buffers, i) + 1, g:spacevim_buffer_index_type)
endif endif
if g:spacevim_enable_tabline_filetype_icon if g:spacevim_enable_tabline_ft_icon || get(g:, 'spacevim_enable_tabline_filetype_icon', 0)
let icon = s:file.fticon(name) let icon = s:file.fticon(name)
if !empty(icon) if !empty(icon)
let name = name . ' ' . icon let name = name . ' ' . icon

View File

@ -12,7 +12,7 @@ function! airline#extensions#tabline#formatters#spacevim#format(bufnr, buffers)
" unique_tail_improved " unique_tail_improved
let id = SpaceVim#api#messletters#get().bubble_num(a:bufnr, g:spacevim_buffer_index_type) . ' ' let id = SpaceVim#api#messletters#get().bubble_num(a:bufnr, g:spacevim_buffer_index_type) . ' '
let fn = airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers) let fn = airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers)
if g:spacevim_enable_tabline_filetype_icon if g:spacevim_enable_tabline_ft_icon || get(g:, 'spacevim_enable_tabline_filetype_icon', 0)
let icon = SpaceVim#api#import('file').fticon(bufname(a:bufnr)) let icon = SpaceVim#api#import('file').fticon(bufname(a:bufnr))
if !empty(icon) if !empty(icon)
let fn = icon . ' ' . fn let fn = icon . ' ' . fn

View File

@ -62,7 +62,9 @@ if !exists('g:startify_custom_header')
endif endif
call SpaceVim#mapping#space#def('nnoremap', ['a','s'], 'Startify | doautocmd WinEnter', 'fancy start screen',1) call SpaceVim#mapping#space#def('nnoremap', ['a','s'], 'Startify | doautocmd WinEnter', 'fancy start screen',1)
if g:spacevim_enable_tabline_filetype_icon if g:spacevim_enable_tabline_ft_icon || get(g:, 'spacevim_enable_tabline_filetype_icon', 0)
" the old option g:spacevim_enable_tabline_filetype_icon should also works
" well
function! FileIcon(path) function! FileIcon(path)
let icon = s:FILE.fticon(a:path) let icon = s:FILE.fticon(a:path)

View File

@ -19,47 +19,50 @@ CONTENTS *SpaceVim-contents*
1. Introduction.............................................|SpaceVim-intro| 1. Introduction.............................................|SpaceVim-intro|
2. Options................................................|SpaceVim-options| 2. Options................................................|SpaceVim-options|
1. autocomplete_method............|SpaceVim-options-autocomplete_method| 1. autocomplete_method............|SpaceVim-options-autocomplete_method|
2. checkinstall..........................|SpaceVim-options-checkinstall| 2. buffer_index_type................|SpaceVim-options-buffer_index_type|
3. colorscheme............................|SpaceVim-options-colorscheme| 3. checkinstall..........................|SpaceVim-options-checkinstall|
4. colorscheme_bg......................|SpaceVim-options-colorscheme_bg| 4. colorscheme............................|SpaceVim-options-colorscheme|
5. default_indent......................|SpaceVim-options-default_indent| 5. colorscheme_bg......................|SpaceVim-options-colorscheme_bg|
6. enable_ale..............................|SpaceVim-options-enable_ale| 6. default_indent......................|SpaceVim-options-default_indent|
7. enable_bepo_layout..............|SpaceVim-options-enable_bepo_layout| 7. enable_ale..............................|SpaceVim-options-enable_ale|
8. enable_cursorline................|SpaceVim-options-enable_cursorline| 8. enable_bepo_layout..............|SpaceVim-options-enable_bepo_layout|
9. enable_debug..........................|SpaceVim-options-enable_debug| 9. enable_cursorline................|SpaceVim-options-enable_cursorline|
10. enable_googlesuggest.........|SpaceVim-options-enable_googlesuggest| 10. enable_debug.........................|SpaceVim-options-enable_debug|
11. enable_guicolors.................|SpaceVim-options-enable_guicolors| 11. enable_googlesuggest.........|SpaceVim-options-enable_googlesuggest|
12. enable_insert_leader.........|SpaceVim-options-enable_insert_leader| 12. enable_guicolors.................|SpaceVim-options-enable_guicolors|
13. enable_key_frequency.........|SpaceVim-options-enable_key_frequency| 13. enable_insert_leader.........|SpaceVim-options-enable_insert_leader|
14. enable_neomake.....................|SpaceVim-options-enable_neomake| 14. enable_key_frequency.........|SpaceVim-options-enable_key_frequency|
15. enable_statusline_bfpath.|SpaceVim-options-enable_statusline_bfpath| 15. enable_neomake.....................|SpaceVim-options-enable_neomake|
16. enable_statusline_mode.....|SpaceVim-options-enable_statusline_mode| 16. enable_statusline_bfpath.|SpaceVim-options-enable_statusline_bfpath|
17. enable_statusline_tag.......|SpaceVim-options-enable_statusline_tag| 17. enable_statusline_mode.....|SpaceVim-options-enable_statusline_mode|
18. enable_ycm.............................|SpaceVim-options-enable_ycm| 18. enable_statusline_tag.......|SpaceVim-options-enable_statusline_tag|
19. error_symbol.........................|SpaceVim-options-error_symbol| 19. enable_tabline_ft_icon.....|SpaceVim-options-enable_tabline_ft_icon|
20. filemanager...........................|SpaceVim-options-filemanager| 20. enable_ycm.............................|SpaceVim-options-enable_ycm|
21. filetree_direction.............|SpaceVim-options-filetree_direction| 21. error_symbol.........................|SpaceVim-options-error_symbol|
22. guifont...................................|SpaceVim-options-guifont| 22. filemanager...........................|SpaceVim-options-filemanager|
23. home_files_number...............|SpaceVim-options-home_files_number| 23. filetree_direction.............|SpaceVim-options-filetree_direction|
24. info_symbol...........................|SpaceVim-options-info_symbol| 24. guifont...................................|SpaceVim-options-guifont|
25. keep_server_alive...............|SpaceVim-options-keep_server_alive| 25. home_files_number...............|SpaceVim-options-home_files_number|
26. language.................................|SpaceVim-options-language| 26. info_symbol...........................|SpaceVim-options-info_symbol|
27. lint_on_the_fly...................|SpaceVim-options-lint_on_the_fly| 27. keep_server_alive...............|SpaceVim-options-keep_server_alive|
28. max_column.............................|SpaceVim-options-max_column| 28. language.................................|SpaceVim-options-language|
29. plugin_bundle_dir...............|SpaceVim-options-plugin_bundle_dir| 29. lint_on_the_fly...................|SpaceVim-options-lint_on_the_fly|
30. plugin_manager_processes.|SpaceVim-options-plugin_manager_processes| 30. max_column.............................|SpaceVim-options-max_column|
31. realtime_leader_guide.......|SpaceVim-options-realtime_leader_guide| 31. plugin_bundle_dir...............|SpaceVim-options-plugin_bundle_dir|
32. relativenumber.....................|SpaceVim-options-relativenumber| 32. plugin_manager_processes.|SpaceVim-options-plugin_manager_processes|
33. retry_cnt...............................|SpaceVim-options-retry_cnt| 33. realtime_leader_guide.......|SpaceVim-options-realtime_leader_guide|
34. sidebar_width.......................|SpaceVim-options-sidebar_width| 34. relativenumber.....................|SpaceVim-options-relativenumber|
35. simple_mode...........................|SpaceVim-options-simple_mode| 35. retry_cnt...............................|SpaceVim-options-retry_cnt|
36. snippet_engine.....................|SpaceVim-options-snippet_engine| 36. sidebar_width.......................|SpaceVim-options-sidebar_width|
37. statusline_iseparator.......|SpaceVim-options-statusline_iseparator| 37. simple_mode...........................|SpaceVim-options-simple_mode|
38. statusline_left_sections.|SpaceVim-options-statusline_left_sections| 38. snippet_engine.....................|SpaceVim-options-snippet_engine|
39. statusline_separator.........|SpaceVim-options-statusline_separator| 39. statusline_iseparator.......|SpaceVim-options-statusline_iseparator|
40. terminal_cursor_shape.......|SpaceVim-options-terminal_cursor_shape| 40. statusline_left_sections.|SpaceVim-options-statusline_left_sections|
41. warning_symbol.....................|SpaceVim-options-warning_symbol| 41. statusline_separator.........|SpaceVim-options-statusline_separator|
42. windows_leader.....................|SpaceVim-options-windows_leader| 42. terminal_cursor_shape.......|SpaceVim-options-terminal_cursor_shape|
43. warning_symbol.....................|SpaceVim-options-warning_symbol|
44. windows_index_type.............|SpaceVim-options-windows_index_type|
45. windows_leader.....................|SpaceVim-options-windows_leader|
3. Configuration...........................................|SpaceVim-config| 3. Configuration...........................................|SpaceVim-config|
4. Commands..............................................|SpaceVim-commands| 4. Commands..............................................|SpaceVim-commands|
5. Functions............................................|SpaceVim-functions| 5. Functions............................................|SpaceVim-functions|
@ -161,6 +164,20 @@ Set the autocomplete engine of spacevim, the default logic is:
and you can alse set this option to coc, then coc.nvim will be used. and you can alse set this option to coc, then coc.nvim will be used.
==============================================================================
BUFFER_INDEX_TYPE *SpaceVim-options-buffer_index_type*
Set SpaceVim buffer index type, default is 4.
>
# types:
# 0: 1 ➛ ➊
# 1: 1 ➛ ➀
# 2: 1 ➛ ⓵
# 3: 1 ➛ ¹
# 4: 1 ➛ 1
buffer_index_type = 1
<
============================================================================== ==============================================================================
CHECKINSTALL *SpaceVim-options-checkinstall* CHECKINSTALL *SpaceVim-options-checkinstall*
@ -231,7 +248,7 @@ Enable/Disable Google suggestions for neocomplete. Default is false.
============================================================================== ==============================================================================
ENABLE_GUICOLORS *SpaceVim-options-enable_guicolors* ENABLE_GUICOLORS *SpaceVim-options-enable_guicolors*
Enable true color support in terminal. Default is true. Enable true color support in terminal. Default is false.
> >
enable_guicolors = true enable_guicolors = true
< <
@ -284,6 +301,15 @@ Enable/Disable showing current tag on statusline
enable_statusline_tag = false enable_statusline_tag = false
< <
==============================================================================
ENABLE_TABLINE_FT_ICON *SpaceVim-options-enable_tabline_ft_icon*
Enable/Disable tabline filetype icon. default is false. To enable this
feature:
>
enable_tabline_ft_icon = true
<
============================================================================== ==============================================================================
ENABLE_YCM *SpaceVim-options-enable_ycm* ENABLE_YCM *SpaceVim-options-enable_ycm*
@ -433,7 +459,7 @@ ultisnips:
STATUSLINE_ISEPARATOR *SpaceVim-options-statusline_iseparator* STATUSLINE_ISEPARATOR *SpaceVim-options-statusline_iseparator*
Set the statusline separators of statusline in inactive windows, default is Set the statusline separators of statusline in inactive windows, default is
'arrow' 'nil'
> >
Separators options: Separators options:
1. arrow 1. arrow
@ -463,7 +489,7 @@ Define the left section of statusline in active windows. By default:
============================================================================== ==============================================================================
STATUSLINE_SEPARATOR *SpaceVim-options-statusline_separator* STATUSLINE_SEPARATOR *SpaceVim-options-statusline_separator*
Set the statusline separators of statusline, default is 'arrow' Set the statusline separators of statusline, default is 'nil'
> >
Separators options: Separators options:
1. arrow 1. arrow
@ -503,6 +529,19 @@ Set the warning symbol for SpaceVim's syntax maker. Default is '⚠'.
warning_symbol = '!' warning_symbol = '!'
< <
==============================================================================
WINDOWS_INDEX_TYPE *SpaceVim-options-windows_index_type*
Set SpaceVim windows index type, default is 3.
>
# types:
# 0: 1 ➛ ➊
# 1: 1 ➛ ➀
# 2: 1 ➛ ⓵
# 3: 1 ➛ 1
windows_index_type = 1
<
============================================================================== ==============================================================================
WINDOWS_LEADER *SpaceVim-options-windows_leader* WINDOWS_LEADER *SpaceVim-options-windows_leader*
@ -550,7 +589,7 @@ Change the list number of files for SpaceVim home. Default is 6.
< <
*g:spacevim_enable_guicolors* *g:spacevim_enable_guicolors*
Enable true color support in terminal. Default is 1. Enable true color support in terminal. Default is 0.
> >
let g:spacevim_enable_guicolors = 1 let g:spacevim_enable_guicolors = 1
< <
@ -651,7 +690,7 @@ normal mode.To disable this feature:
< <
*g:spacevim_statusline_separator* *g:spacevim_statusline_separator*
Set the statusline separators of statusline, default is 'arrow' Set the statusline separators of statusline, default is 'nil'
> >
Separators options: Separators options:
1. arrow 1. arrow
@ -666,7 +705,7 @@ See more details in: http://spacevim.org/documentation/#statusline
*g:spacevim_statusline_iseparator* *g:spacevim_statusline_iseparator*
Set the statusline separators of statusline in inactive windows, default is Set the statusline separators of statusline in inactive windows, default is
'arrow' 'nil'
> >
Separators options: Separators options:
1. arrow 1. arrow
@ -867,7 +906,7 @@ Set the debug level of SpaceVim. Default is 1. see
|SpaceVim#logger#setLevel()| |SpaceVim#logger#setLevel()|
*g:spacevim_buffer_index_type* *g:spacevim_buffer_index_type*
Set SpaceVim buffer index type, default is 0. Set SpaceVim buffer index type, default is 4.
> >
" types: " types:
" 0: 1 ➛ ➊ " 0: 1 ➛ ➊
@ -879,7 +918,7 @@ Set SpaceVim buffer index type, default is 0.
< <
*g:spacevim_windows_index_type* *g:spacevim_windows_index_type*
Set SpaceVim windows index type, default is 0. Set SpaceVim windows index type, default is 3.
> >
" types: " types:
" 0: 1 ➛ ➊ " 0: 1 ➛ ➊
@ -889,7 +928,7 @@ Set SpaceVim windows index type, default is 0.
let g:spacevim_windows_index_type = 1 let g:spacevim_windows_index_type = 1
< <
*g:spacevim_enable_tabline_filetype_icon* *g:spacevim_enable_tabline_ft_icon*
Enable/Disable tabline filetype icon. default is 0. Enable/Disable tabline filetype icon. default is 0.
*g:spacevim_enable_os_fileformat_icon* *g:spacevim_enable_os_fileformat_icon*

View File

@ -378,9 +378,8 @@ the variable colorschemes. For instance, to specify `desert`:
All the included colorschemes can be found in [colorscheme layer](../layers/colorscheme/). All the included colorschemes can be found in [colorscheme layer](../layers/colorscheme/).
**NOTE**: SpaceVim supports true colors in terminal, and it is disabled by default, to enable this feature,
you should make sure your terminal supports true colors.
SpaceVim uses true colors by default, so you should make sure your terminal supports true colors.
For more information see: [Colours in terminal](https://gist.github.com/XVilka/8346728). For more information see: [Colours in terminal](https://gist.github.com/XVilka/8346728).
If your terminal does not support true colors, you can disable SpaceVim true colors feature in `[options]` section: If your terminal does not support true colors, you can disable SpaceVim true colors feature in `[options]` section: