Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 14 additions & 22 deletions plugin/quickui.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"======================================================================
"
" quickui.vim -
" quickui.vim -
"
" Created by skywind on 2019/12/26
" Last Modified: 2019/12/26 18:20:52
Expand Down Expand Up @@ -29,17 +29,18 @@ let s:rtp = fnamemodify(s:home, ':h')
"----------------------------------------------------------------------
let g:quickui#style#border = get(g:, 'quickui_border_style', 1)


"----------------------------------------------------------------------
" default highlighting
"----------------------------------------------------------------------
function! s:hilink(name, target)
if !hlexists(a:name)
exec 'hi! link ' . a:name . ' ' . a:target
endif
function! s:set_quickui_hi()
" hi! QuickDefaultSel ctermbg=
hi! link QuickBG QuickDefaultBackground
hi! link QuickSel QuickDefaultSel
hi! link QuickKey QuickDefaultKey
hi! link QuickOff QuickDefaultDisable
hi! link QuickHelp QuickDefaultHelp
hi! link QuickBorder QuickDefaultBorder
hi! link QuickTermBorder QuickDefaultTermBorder
hi! link QuickPreview QuickDefaultPreview
endfunc


function! QuickThemeChange(theme)
let theme = 'borland'
if a:theme == 'default'
Expand All @@ -52,7 +53,7 @@ function! QuickThemeChange(theme)
let theme = 'gruvbox'
elseif a:theme == 'solarized'
let theme = 'solarized'
elseif a:theme == 'papercol' || a:theme == 'papercol-dark'
elseif a:theme == 'papercol' || a:theme == 'papercol-dark'
let theme = 'papercol_dark'
elseif a:theme == 'papercol dark'
let theme = 'papercol_dark'
Expand All @@ -68,6 +69,7 @@ function! QuickThemeChange(theme)
if filereadable(s:fname)
exec "source " . fnameescape(s:fname)
endif
call s:set_quickui_hi()
endfunc

let s:scheme = get(g:, 'quickui_color_scheme', '')
Expand All @@ -78,14 +80,4 @@ augroup quickui "{{{
autocmd Colorscheme * call QuickThemeChange(get(g:, 'quickui_color_scheme', ''))
augroup END "}}}

" hi! QuickDefaultSel ctermbg=
call s:hilink('QuickBG', 'QuickDefaultBackground')
call s:hilink('QuickSel', 'QuickDefaultSel')
call s:hilink('QuickKey', 'QuickDefaultKey')
call s:hilink('QuickOff', 'QuickDefaultDisable')
call s:hilink('QuickHelp', 'QuickDefaultHelp')
call s:hilink('QuickBorder', 'QuickDefaultBorder')
call s:hilink('QuickTermBorder', 'QuickDefaultTermBorder')
call s:hilink('QuickPreview', 'QuickDefaultPreview')


call s:set_quickui_hi()