1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-23 17:49:57 +08:00

Update documentation about statusline colors (#1545)

close #1395
This commit is contained in:
Wang Shidong 2018-03-24 08:15:45 -05:00 committed by GitHub
parent 3870759a2a
commit 9b315efb85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 24 deletions

View File

@ -238,6 +238,8 @@ let g:spacevim_enable_statusline_display_mode = 0
" \ ['#282828', '#83a598', 235, 109], " \ ['#282828', '#83a598', 235, 109],
" \ ['#282828', '#fe8019', 235, 208], " \ ['#282828', '#fe8019', 235, 208],
" \ ['#282828', '#8ec07c', 235, 108], " \ ['#282828', '#8ec07c', 235, 108],
" \ ['#282828', '#689d6a', 235, 72],
" \ ['#282828', '#8f3f71', 235, 132],
" \ ] " \ ]
" < " <
" "

View File

@ -6,23 +6,6 @@
" License: GPLv3 " License: GPLv3
"============================================================================= "=============================================================================
" the theme colors should be
" [
" \ [ a_guifg, a_guibg, a_ctermfg, a_ctermbg],
" \ [ b_guifg, b_guibg, b_ctermfg, b_ctermbg],
" \ [ c_guifg, c_guibg, c_ctermfg, c_ctermbg],
" \ [ z_guibg, z_ctermbg],
" \ [ i_guifg, i_guibg, i_ctermfg, i_ctermbg],
" \ [ v_guifg, v_guibg, v_ctermfg, v_ctermbg],
" \ [ r_guifg, r_guibg, r_ctermfg, r_ctermbg],
" \ [ ii_guifg, ii_guibg, ii_ctermfg, ii_ctermbg],
" \ [ in_guifg, in_guibg, in_ctermfg, in_ctermbg],
" \ ]
let s:yellow = 'ctermfg=214 guifg=#fabd2f'
let s:blus = 'ctermfg=109 guifg=#83a598'
let s:aqua = 'ctermfg=108 guifg=#8ec07c'
let s:orange = 'ctermfg=208 guifg=#fe8019'
function! SpaceVim#mapping#guide#theme#gruvbox#palette() abort function! SpaceVim#mapping#guide#theme#gruvbox#palette() abort
return [ return [
\ ['#282828', '#a89984', 246, 235], \ ['#282828', '#a89984', 246, 235],

View File

@ -266,6 +266,8 @@ theme
\ ['#282828', '#83a598', 235, 109], \ ['#282828', '#83a598', 235, 109],
\ ['#282828', '#fe8019', 235, 208], \ ['#282828', '#fe8019', 235, 208],
\ ['#282828', '#8ec07c', 235, 108], \ ['#282828', '#8ec07c', 235, 108],
\ ['#282828', '#689d6a', 235, 72],
\ ['#282828', '#8f3f71', 235, 132],
\ ] \ ]
< <

View File

@ -494,13 +494,15 @@ contribute theme please check the template of a statusline theme.
```vim ```vim
" the theme colors should be " the theme colors should be
" [ " [
" \ [ a_guifg, a_guibg, a_ctermfg, a_ctermbg], " \ [ a_guifg, a_guibg, a_ctermfg, a_ctermbg],
" \ [ b_guifg, b_guibg, b_ctermfg, b_ctermbg], " \ [ b_guifg, b_guibg, b_ctermfg, b_ctermbg],
" \ [ c_guifg, c_guibg, c_ctermfg, c_ctermbg], " \ [ c_guifg, c_guibg, c_ctermfg, c_ctermbg],
" \ [ z_guibg, z_ctermbg], " \ [ z_guibg, z_ctermbg],
" \ [ i_guifg, i_guibg, i_ctermfg, i_ctermbg], " \ [ i_guifg, i_guibg, i_ctermfg, i_ctermbg],
" \ [ v_guifg, v_guibg, v_ctermfg, v_ctermbg], " \ [ v_guifg, v_guibg, v_ctermfg, v_ctermbg],
" \ [ r_guifg, r_guibg, r_ctermfg, r_ctermbg], " \ [ r_guifg, r_guibg, r_ctermfg, r_ctermbg],
" \ [ ii_guifg, ii_guibg, ii_ctermfg, ii_ctermbg],
" \ [ in_guifg, in_guibg, in_ctermfg, in_ctermbg],
" \ ] " \ ]
" group_a: window id " group_a: window id
" group_b/group_c: stausline sections " group_b/group_c: stausline sections
@ -508,6 +510,8 @@ contribute theme please check the template of a statusline theme.
" group_i: window id in insert mode " group_i: window id in insert mode
" group_v: window id in visual mode " group_v: window id in visual mode
" group_r: window id in select mode " group_r: window id in select mode
" group_ii: window id in iedit-insert mode
" group_in: windows id in iedit-normal mode
function! SpaceVim#mapping#guide#theme#gruvbox#palette() abort function! SpaceVim#mapping#guide#theme#gruvbox#palette() abort
return [ return [
\ ['#282828', '#a89984', 246, 235], \ ['#282828', '#a89984', 246, 235],
@ -517,10 +521,30 @@ function! SpaceVim#mapping#guide#theme#gruvbox#palette() abort
\ ['#282828', '#83a598', 235, 109], \ ['#282828', '#83a598', 235, 109],
\ ['#282828', '#fe8019', 235, 208], \ ['#282828', '#fe8019', 235, 208],
\ ['#282828', '#8ec07c', 235, 108], \ ['#282828', '#8ec07c', 235, 108],
\ ['#282828', '#689d6a', 235, 72],
\ ['#282828', '#8f3f71', 235, 132],
\ ] \ ]
endfunction endfunction
``` ```
this example is for gruvbox colorscheme, if you want to use same colors when
switch between different colorschemes, you may need to set
`g:spacevim_custom_color_palette` in your custom configration file. for example:
```vim
let g:spacevim_custom_color_palette = [
\ ['#282828', '#a89984', 246, 235],
\ ['#a89984', '#504945', 239, 246],
\ ['#a89984', '#3c3836', 237, 246],
\ ['#665c54', 241],
\ ['#282828', '#83a598', 235, 109],
\ ['#282828', '#fe8019', 235, 208],
\ ['#282828', '#8ec07c', 235, 108],
\ ['#282828', '#689d6a', 235, 72],
\ ['#282828', '#8f3f71', 235, 132],
\ ]
```
### tabline ### tabline
Buffers will be listed on tabline if there is only one tab, each item contains Buffers will be listed on tabline if there is only one tab, each item contains