mirror of
https://github.com/Yggdroot/indentLine.git
synced 2026-05-17 22:09:41 +08:00
allow the indent guides to be redrawn if 'shiftwidth' changes
Usage: ResetIndentLines [number]
This commit is contained in:
@@ -53,8 +53,16 @@ function! <SID>SetIndentLine()
|
|||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! <SID>ResetWidth(...)
|
||||||
|
if a:0 > 0
|
||||||
|
let &l:shiftwidth = a:1
|
||||||
|
endif
|
||||||
|
syn clear IndentLine
|
||||||
|
call <SID>SetIndentLine()
|
||||||
|
endfunction
|
||||||
|
|
||||||
autocmd BufRead * call <SID>SetIndentLine()
|
autocmd BufRead * call <SID>SetIndentLine()
|
||||||
autocmd BufRead,ColorScheme * call <SID>InitColor()
|
autocmd BufRead,ColorScheme * call <SID>InitColor()
|
||||||
|
command! -nargs=? ResetIndentLines call <SID>ResetWidth(<f-args>)
|
||||||
|
|
||||||
" vim:et:ts=4:sw=4:fdm=marker:fmr={{{,}}}
|
" vim:et:ts=4:sw=4:fdm=marker:fmr={{{,}}}
|
||||||
|
|||||||
Reference in New Issue
Block a user