mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:10:04 +08:00
Update logo on command
This commit is contained in:
parent
f92a480dd4
commit
a6f134ac30
@ -1,5 +1,5 @@
|
||||
let s:NUM = SpaceVim#api#import('data#number')
|
||||
|
||||
fu! s:update_logo()
|
||||
if !exists('g:startify_custom_header') && !exists('g:_spacevim_welcome_banners')
|
||||
let g:startify_custom_header = [
|
||||
\'',
|
||||
@ -21,6 +21,8 @@ if !exists('g:startify_custom_header') && !exists('g:_spacevim_welcome_banners')
|
||||
elseif exists('g:_spacevim_welcome_banners')
|
||||
let g:startify_custom_header = g:_spacevim_welcome_banners[s:NUM.random(0, len(g:_spacevim_welcome_banners))]
|
||||
endif
|
||||
endf
|
||||
call s:update_logo()
|
||||
let g:startify_session_dir = $HOME . '/.data/' . ( has('nvim') ? 'nvim' : 'vim' ) . '/session'
|
||||
let g:startify_files_number = 6
|
||||
let g:startify_list_order = [
|
||||
@ -50,12 +52,13 @@ fu! <SID>startify_mapping()
|
||||
if getcwd() == $VIM || getcwd() == expand('~')
|
||||
nnoremap <silent><buffer> <c-p> :<c-u>CtrlP ~\DotFiles<cr>
|
||||
endif
|
||||
call s:update_logo()
|
||||
endf
|
||||
augroup startify_map
|
||||
au!
|
||||
autocmd FileType startify nnoremap <buffer><F2> <Nop>
|
||||
autocmd FileType startify call <SID>startify_mapping()
|
||||
autocmd FileType startify set scrolloff=0
|
||||
autocmd FileType startify setl scrolloff=0 nowrap
|
||||
augroup END
|
||||
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['a','s'], 'Startify', 'fancy start screen',1)
|
||||
|
Loading…
Reference in New Issue
Block a user