Skip to content

Commit

Permalink
Merge pull request #19 from scoz/ignore-space-option
Browse files Browse the repository at this point in the history
Added a flag for ignoring spaces.
  • Loading branch information
nathanaelkane committed Aug 30, 2011
2 parents eb56444 + 9d18930 commit 6854275
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autoload/indent_guides.vim
Expand Up @@ -46,7 +46,9 @@ function! indent_guides#enable()
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
call add(w:indent_guides_matches, matchadd(l:group, l:soft_pattern))
if g:indent_guides_space_guides
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))
endfor
endfunction
Expand Down
8 changes: 8 additions & 0 deletions doc/indent_guides.txt
Expand Up @@ -133,6 +133,14 @@ Default: 1. Values: between 1 and g:|indent_guides_indent_levels|.
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'*
Use this option to control whether the plugin is enabled on Vim startup.
Expand Down
1 change: 1 addition & 0 deletions plugin/indent_guides.vim
Expand Up @@ -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_enable_on_vim_startup', 0 )
call s:InitVariable('g:indent_guides_debug', 0 )
call s:InitVariable('g:indent_guides_space_guides', 1 )

" Default mapping
nmap <Leader>ig :IndentGuidesToggle<CR>
Expand Down

0 comments on commit 6854275

Please sign in to comment.