Add g:brightest#enable_clear_highlight_on_CursorMoved.

This commit is contained in:
manga_osyo
2015-04-08 23:04:04 +09:00
parent 87f3457f8d
commit 48d1b29fa6
2 changed files with 12 additions and 1 deletions

View File

@@ -230,8 +230,9 @@ function! brightest#on_CursorHold()
endif endif
endfunction endfunction
let g:brightest#enable_clear_highlight_on_CursorMoved = get(g:, "brightest#enable_clear_highlight_on_CursorMoved", 1)
function! brightest#on_CursorMoved() function! brightest#on_CursorMoved()
if s:is_enable_on_cursorhold() if s:is_enable_on_cursorhold() && g:brightest#enable_clear_highlight_on_CursorMoved
call brightest#hl_clear() call brightest#hl_clear()
endif endif
if s:is_enable() && !s:is_enable_on_cursorhold() if s:is_enable() && !s:is_enable_on_cursorhold()

View File

@@ -161,6 +161,16 @@ Default: >
let g:brightest#enable_on_CursorHold = 0 let g:brightest#enable_on_CursorHold = 0
< <
*g:brightest#enable_clear_highlight_on_CursorMoved*
g:brightest#enable_clear_highlight_on_CursorMoved
1 が設定されている場合、|CursorMoved| 時にハイライトが消えるようになり
ます。
|CursorHold| 時にハイライトしている時にカーソルが移動してもハイライト
を残したい場合には 0 を設定してください。
Default: >
let g:brightest#enable_clear_highlight_on_CursorMoved = 1
<
============================================================================== ==============================================================================
ハイライトグループ *brightest-highlight_group* ハイライトグループ *brightest-highlight_group*