mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:10:05 +08:00
Merge branch 'dev' into fix_shell
This commit is contained in:
commit
81d3343a84
@ -212,7 +212,7 @@ let g:spacevim_use_colorscheme = 1
|
||||
" Set the help language of vim. Default is 'en'.
|
||||
" You can change it to Chinese.
|
||||
" >
|
||||
" let g:spacevim_vim_help_language = 'chinese'
|
||||
" let g:spacevim_vim_help_language = 'cn'
|
||||
" <
|
||||
let g:spacevim_vim_help_language = 'en'
|
||||
""
|
||||
@ -525,7 +525,7 @@ function! SpaceVim#end() abort
|
||||
endfor
|
||||
if g:spacevim_vim_help_language ==# 'cn'
|
||||
call add(g:spacevim_plugin_groups, 'chinese')
|
||||
elseif g:spacevim_vim_help_language ==# 'japanese'
|
||||
elseif g:spacevim_vim_help_language ==# 'ja'
|
||||
call add(g:spacevim_plugin_groups, 'japanese')
|
||||
endif
|
||||
if g:spacevim_use_colorscheme==1
|
||||
|
@ -54,8 +54,20 @@ let s:self._color_map = {
|
||||
\ '250': '#bcbcbc', '251': '#c6c6c6', '252': '#d0d0d0', '253': '#dadada', '254': '#e4e4e4',
|
||||
\ '255': '#eeeeee', 'fg': 'fg', 'bg': 'bg', 'NONE': 'NONE' }
|
||||
|
||||
let s:self._deps = SpaceVim#api#import('data#dict')
|
||||
function! s:self.nr2str(nr) abort
|
||||
return get(self._color_map, a:nr, '')
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:self.str2nr(str) abort
|
||||
let nr = get(self._deps.swap(self._color_map), a:str, -1)
|
||||
if nr =~ 'fg\|bg\|NONE'
|
||||
return nr
|
||||
else
|
||||
return str2nr(nr)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
function! SpaceVim#api#color#get() abort
|
||||
|
@ -199,19 +199,21 @@ statusline. To enable this feature:
|
||||
<
|
||||
|
||||
*g:spacevim_custom_color_palette*
|
||||
Add custom color palette for statusline and tabline.
|
||||
Set the statusline/tabline palette of color, default values depends on the
|
||||
theme
|
||||
>
|
||||
let g:spacevim_custom_color_palette = [
|
||||
\ ['#282828', '#b8bb26', 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', '#b8bb26', 246, 235],
|
||||
\ ['#a89984', '#504945', 239, 246],
|
||||
\ ['#a89984', '#3c3836', 237, 246],
|
||||
\ ['#665c54', 241],
|
||||
\ ['#282828', '#83a598', 235, 109],
|
||||
\ ['#282828', '#fe8019', 235, 208],
|
||||
\ ['#282828', '#8ec07c', 235, 108],
|
||||
\ ]
|
||||
<
|
||||
|
||||
|
||||
*g:spacevim_enable_cursorcolumn*
|
||||
Enable/Disable cursorcolumn. Default is 0, cursorcolumn will be highlighted in
|
||||
normal mode. To enable this feature:
|
||||
@ -246,7 +248,7 @@ might require adding the following to ~/.tmux.conf:
|
||||
*g:spacevim_vim_help_language*
|
||||
Set the help language of vim. Default is 'en'. You can change it to Chinese.
|
||||
>
|
||||
let g:spacevim_vim_help_language = 'chinese'
|
||||
let g:spacevim_vim_help_language = 'cn'
|
||||
<
|
||||
|
||||
*g:spacevim_language*
|
||||
|
5
test/api/color.vader
Normal file
5
test/api/color.vader
Normal file
@ -0,0 +1,5 @@
|
||||
Execute ( SpaceVim api color ):
|
||||
let color = SpaceVim#api#import('color')
|
||||
AssertEqual color.nr2str(233), '#121212'
|
||||
AssertEqual color.str2nr('#121212'), 233
|
||||
AssertEqual color.str2nr('bg'), 'bg'
|
3
test/api/data/json.vader
Normal file
3
test/api/data/json.vader
Normal file
@ -0,0 +1,3 @@
|
||||
Execute ( SpaceVim api: data#json ):
|
||||
let json = SpaceVim#api#import('data#json')
|
||||
AssertEqual json.json_decode(json.json_encode({'foo' : 'zaa'})), {'foo' : 'zaa'}
|
3
test/api/vim/key.vader
Normal file
3
test/api/vim/key.vader
Normal file
@ -0,0 +1,3 @@
|
||||
Execute ( SpaceVim api: vim#key ):
|
||||
let key = SpaceVim#api#import('vim#key')
|
||||
AssertEqual key.nr2name(32), 'SPC'
|
5
test/mode.vader
Normal file
5
test/mode.vader
Normal file
@ -0,0 +1,5 @@
|
||||
Execute ( SpaceVim mode ):
|
||||
so mode/basic.vim
|
||||
AssertEqual g:spacevim_enable_guicolors, 0
|
||||
so mode/dark_powered.vim
|
||||
AssertEqual g:spacevim_enable_debug, 1
|
4
test/syntax.vader
Normal file
4
test/syntax.vader
Normal file
@ -0,0 +1,4 @@
|
||||
Execute ( SpaceVim syntax file ):
|
||||
for sfile in globpath(getcwd(), "syntax/*.vim", 0, 1)
|
||||
exe 'so ' . sfile
|
||||
endfor
|
Loading…
Reference in New Issue
Block a user