mirror of
https://github.com/preservim/vim-thematic.git
synced 2025-11-15 05:13:49 -05:00
support initial theme when starting Vim
This commit is contained in:
@@ -13,8 +13,6 @@ let g:loaded_thematic = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let g:thematic#theme_name = ''
|
||||
|
||||
" Preserve original settings
|
||||
|
||||
let g:thematic#original = {}
|
||||
@@ -73,6 +71,16 @@ noremap <silent> <Plug>ThematicPrevious :ThematicPrevious<CR>
|
||||
noremap <silent> <Plug>ThematicRandom :ThematicRandom<CR>
|
||||
noremap <silent> <Plug>ThematicOriginal :ThematicOriginal<CR>
|
||||
|
||||
if exists('g:thematic#theme_name')
|
||||
" support an initial theme when starting Vim
|
||||
augroup thematic_startup
|
||||
autocmd!
|
||||
autocmd VimEnter * call thematic#init(g:thematic#theme_name)
|
||||
augroup END
|
||||
else
|
||||
let g:thematic#theme_name = ''
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim:ts=2:sw=2:sts=2
|
||||
|
||||
Reference in New Issue
Block a user