1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:20:05 +08:00

Update logo on command

This commit is contained in:
wsdjeg 2017-04-29 14:23:00 +08:00
parent f92a480dd4
commit a6f134ac30

View File

@ -1,26 +1,28 @@
let s:NUM = SpaceVim#api#import('data#number')
if !exists('g:startify_custom_header') && !exists('g:_spacevim_welcome_banners')
let g:startify_custom_header = [
\'',
\'',
\' /###### /## /##/## ',
\' /##__ ## | ## | #|__/ ',
\' | ## \__/ /###### /###### /####### /######| ## | ##/##/######/#### ',
\' | ###### /##__ ##|____ ##/##_____//##__ #| ## / ##| #| ##_ ##_ ##',
\' \____ #| ## \ ## /######| ## | ########\ ## ##/| #| ## \ ## \ ##',
\' /## \ #| ## | ##/##__ #| ## | ##_____/ \ ###/ | #| ## | ## | ##',
\' | ######| #######| ######| ######| ####### \ #/ | #| ## | ## | ##',
\' \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/ |__/',
\' | ## ',
\' | ## ',
\' |__/ ',
\' version : ' . g:spacevim_version . ' by : spacevim.org',
\'',
\ ]
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
fu! s:update_logo()
if !exists('g:startify_custom_header') && !exists('g:_spacevim_welcome_banners')
let g:startify_custom_header = [
\'',
\'',
\' /###### /## /##/## ',
\' /##__ ## | ## | #|__/ ',
\' | ## \__/ /###### /###### /####### /######| ## | ##/##/######/#### ',
\' | ###### /##__ ##|____ ##/##_____//##__ #| ## / ##| #| ##_ ##_ ##',
\' \____ #| ## \ ## /######| ## | ########\ ## ##/| #| ## \ ## \ ##',
\' /## \ #| ## | ##/##__ #| ## | ##_____/ \ ###/ | #| ## | ## | ##',
\' | ######| #######| ######| ######| ####### \ #/ | #| ## | ## | ##',
\' \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/ |__/',
\' | ## ',
\' | ## ',
\' |__/ ',
\' version : ' . g:spacevim_version . ' by : spacevim.org',
\'',
\ ]
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)