Add :BrightestLock, :BrightestUnlock.

This commit is contained in:
manga_osyo
2014-08-29 14:31:31 +09:00
parent 905e35eeea
commit 572d8bdb13
3 changed files with 15 additions and 2 deletions

View File

@@ -24,12 +24,19 @@ command! -bar BrightestHighlight call brightest#highlighting()
command! -bar BrightestClear call brightest#hl_clear()
command! -bar BrightestEnable let g:brightest_enable = 1 | BrightestHighlight
command! -bar BrightestDisable let g:brightest_enable = 0 | BrightestClear
command! -bar BrightestUnlock let b:brightest_enable = 1 | BrightestHighlight
command! -bar BrightestLock let b:brightest_enable = 0 | BrightestClear
function! s:highlight()
if g:brightest_enable && get(b:, "brightest_enable", 1)
call brightest#highlighting()
endif
endfunction
augroup brightest
autocmd!
autocmd CursorMoved * call brightest#highlighting()
autocmd CursorMoved * call s:highlight()
autocmd BufLeave,WinLeave,InsertEnter * call brightest#hl_clear()
autocmd ColorScheme * call s:init_hl()
augroup END