11 Commits
1.5 ... 1.6

Author SHA1 Message Date
Nate Kane
cf6f4d4661 Bump version to 1.6. 2012-01-01 21:44:16 +10:00
Nate Kane
2cbe919452 Update copyright year in help file. 2012-01-01 21:44:14 +10:00
Nate Kane
e8f50f3c8b Remove IRC as contact method in help file. 2012-01-01 21:44:10 +10:00
Nate
f1c115ce5d Merge pull request #25 from mutewinter/master
Fix E803 ID not found spam.
2011-11-28 14:43:13 -08:00
Nate
287132df04 Merge pull request #27 from acx0/master
Fix str2float issue with Vim 7.1.
2011-11-28 14:27:16 -08:00
Sam Lidder
bdf4ec3ff8 Added test to only use str2float if compiled with +float 2011-10-19 22:36:39 -04:00
Jeremy Mack
57b6da6d12 Fixes E803 ID not found spam 2011-09-28 21:19:41 -03:00
Nate
6854275667 Merge pull request #19 from scoz/ignore-space-option
Added a flag for ignoring spaces.
2011-08-30 05:21:42 -07:00
Nate
eb5644430a Merge pull request #22 from lenniboy/master
Add 'doc/tags' to gitgnore.
2011-08-30 05:09:31 -07:00
Leonard Ehrenfried
951619130f add doc/tags to gitgnore - helps to keep the vim/bundles dir clean if using pathogen with git submodules 2011-08-23 22:14:10 +02:00
Ryan Souza
9d189306aa Added a flag for ignoring spaces
Added flag g:indent_guides_enable_on_vim_startup
Controls whether spaces are considered for indent calculating
2011-07-31 18:11:04 -07:00
4 changed files with 35 additions and 7 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
doc/tags

View File

@@ -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
@@ -68,7 +70,11 @@ function! indent_guides#clear_matches()
if !empty(w:indent_guides_matches)
let l:index = 0
for l:match_id in w:indent_guides_matches
call matchdelete(l:match_id)
try
call matchdelete(l:match_id)
catch /E803:/
" Do nothing
endtry
call remove(w:indent_guides_matches, l:index)
let l:index += l:index
endfor
@@ -180,12 +186,18 @@ function! indent_guides#init_script_vars()
let s:debug = g:indent_guides_debug
let s:indent_levels = g:indent_guides_indent_levels
let s:auto_colors = g:indent_guides_auto_colors
let s:change_percent = g:indent_guides_color_change_percent / str2float("100.0")
let s:color_hex_pat = g:indent_guides_color_hex_pattern
let s:color_hex_bg_pat = g:indent_guides_color_hex_guibg_pattern
let s:color_name_bg_pat = g:indent_guides_color_name_guibg_pattern
let s:start_level = g:indent_guides_start_level
" str2float not available in vim versions <= 7.1
if has('float')
let s:change_percent = g:indent_guides_color_change_percent / str2float('100.0')
else
let s:change_percent = g:indent_guides_color_change_percent / 100.0
endif
if s:debug
echo 's:indent_size = ' . s:indent_size
echo 's:guide_size = ' . s:guide_size

View File

@@ -9,8 +9,8 @@
Author: Nate Kane <nathanaelkane AT gmail DOT com>
Version: 1.5
Last Change: 13 Mar 2011
Version: 1.6
Last Change: 01 Jan 2012
==============================================================================
CONTENTS *indent-guides-contents*
@@ -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.
@@ -212,13 +220,19 @@ Credits:~
Contact:~
* Twitter: @nathanaelkane
* Email: <nathanaelkane AT gmail DOT com>
* IRC: nate- on Freenode (I usually idle in the #vim channel)
Bug reports, feedback, suggestions etc are welcomed.
==============================================================================
7. CHANGELOG *indent-guides-changelog*
1.6~
* Added option g:|indent_guides_space_guides| to control whether spaces are
considered as indention (thanks scoz).
* Added 'doc/tags' to gitignore (thanks lenniboy).
* Fixed E803 ID not found spam (thanks mutewinter).
* Fixed str2float issue with Vim 7.1 (thanks acx0).
1.5~
* Added highlight support for files with a mixture of tab and space indent
styles (thanks graywh).
@@ -258,7 +272,7 @@ Bug reports, feedback, suggestions etc are welcomed.
The MIT Licence
http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2010-2011 Nate Kane
Copyright (c) 2010-2012 Nate Kane
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -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>