Added a flag for ignoring spaces
Added flag g:indent_guides_enable_on_vim_startup Controls whether spaces are considered for indent calculating
This commit is contained in:
parent
62a2fd103f
commit
9d189306aa
@ -46,7 +46,9 @@ function! indent_guides#enable()
|
|||||||
let l:hard_pattern = indent_guides#indent_highlight_pattern('\t', l:column_start, s:indent_size)
|
let l:hard_pattern = indent_guides#indent_highlight_pattern('\t', l:column_start, s:indent_size)
|
||||||
|
|
||||||
" define the higlight patterns and add to matches list
|
" define the higlight patterns and add to matches list
|
||||||
|
if g:indent_guides_space_guides
|
||||||
call add(w:indent_guides_matches, matchadd(l:group, l:soft_pattern))
|
call add(w:indent_guides_matches, matchadd(l:group, l:soft_pattern))
|
||||||
|
end
|
||||||
call add(w:indent_guides_matches, matchadd(l:group, l:hard_pattern))
|
call add(w:indent_guides_matches, matchadd(l:group, l:hard_pattern))
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -133,6 +133,14 @@ Default: 1. Values: between 1 and g:|indent_guides_indent_levels|.
|
|||||||
let g:indent_guides_start_level = 2
|
let g:indent_guides_start_level = 2
|
||||||
<
|
<
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*'indent_guides_space_guides'*
|
||||||
|
Use this option to control whether the plugin considers spaces as indention.
|
||||||
|
|
||||||
|
Default: 1. Values: 0 or 1.
|
||||||
|
>
|
||||||
|
let g:indent_guides_space_guides = 0
|
||||||
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*'indent_guides_enable_on_vim_startup'*
|
*'indent_guides_enable_on_vim_startup'*
|
||||||
Use this option to control whether the plugin is enabled on Vim startup.
|
Use this option to control whether the plugin is enabled on Vim startup.
|
||||||
|
@ -52,6 +52,7 @@ call s:InitVariable('g:indent_guides_guide_size', 0 )
|
|||||||
call s:InitVariable('g:indent_guides_start_level', 1 )
|
call s:InitVariable('g:indent_guides_start_level', 1 )
|
||||||
call s:InitVariable('g:indent_guides_enable_on_vim_startup', 0 )
|
call s:InitVariable('g:indent_guides_enable_on_vim_startup', 0 )
|
||||||
call s:InitVariable('g:indent_guides_debug', 0 )
|
call s:InitVariable('g:indent_guides_debug', 0 )
|
||||||
|
call s:InitVariable('g:indent_guides_space_guides', 1 )
|
||||||
|
|
||||||
" Default mapping
|
" Default mapping
|
||||||
nmap <Leader>ig :IndentGuidesToggle<CR>
|
nmap <Leader>ig :IndentGuidesToggle<CR>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user