mirror of
https://github.com/preservim/vim-indent-guides.git
synced 2025-11-12 11:53:46 -05:00
Added symmetrical option to disable indents for tab
nathanaelkane/vim-indent-guides#102
This commit is contained in:
@@ -47,14 +47,18 @@ function! indent_guides#enable()
|
||||
for l:level in range(s:start_level, s:indent_levels)
|
||||
let l:group = 'IndentGuides' . ((l:level % 2 == 0) ? 'Even' : 'Odd')
|
||||
let l:column_start = (l:level - 1) * s:indent_size + 1
|
||||
let l:soft_pattern = indent_guides#indent_highlight_pattern(g:indent_guides_soft_pattern, l:column_start, s:guide_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
|
||||
if g:indent_guides_space_guides
|
||||
let l:soft_pattern = indent_guides#indent_highlight_pattern(
|
||||
\ g:indent_guides_soft_pattern, l:column_start, s:guide_size)
|
||||
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))
|
||||
if g:indent_guides_tab_guides
|
||||
let l:hard_pattern = indent_guides#indent_highlight_pattern(
|
||||
\ '\t', l:column_start, s:indent_size)
|
||||
call add(w:indent_guides_matches, matchadd(l:group, l:hard_pattern))
|
||||
end
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user