3 Commits
1.3 ... 1.4

Author SHA1 Message Date
Nate Kane
4a3c2d3d46 Updated the Last Change date 2011-02-06 22:54:48 +10:00
Nate Kane
353bef3dba Improved Windows support 2011-01-24 22:25:17 +10:00
Nate Kane
3c86647883 Added new global option to configure whether the plugin is enabled on Vim startup 2011-01-24 20:45:18 +10:00
3 changed files with 30 additions and 8 deletions

View File

@@ -172,6 +172,9 @@ function! indent_guides#init_script_vars()
let s:guide_size = indent_guides#calculate_guide_size()
let s:hi_normal = indent_guides#capture_highlight('Normal')
" remove 'font=<value>' from the s:hi_normal string (only seems to happen on Vim startup in Windows)
let s:hi_normal = substitute(s:hi_normal, ' font=[A-Za-z0-9:]\+', "", "")
" shortcuts to the global variables - this makes the code easier to read
let s:debug = g:indent_guides_debug
let s:indent_levels = g:indent_guides_indent_levels

View File

@@ -9,8 +9,8 @@
Author: Nate Kane <nathanaelkane AT gmail DOT com>
Version: 1.3
Last Change: 17 Jan 2011
Version: 1.4
Last Change: 6 Feb 2011
==============================================================================
CONTENTS *indent-guides-contents*
@@ -126,6 +126,15 @@ Default: 1. Values: between 1 and g:|indent_guides_indent_levels|.
let g:indent_guides_start_level = 2
<
------------------------------------------------------------------------------
*'indent_guides_enable_on_vim_startup'*
Use this option to control whether the plugin is enabled on Vim startup.
Default: 0. Values: 0 or 1.
>
let g:indent_guides_enable_on_vim_startup = 0
<
==============================================================================
4. MAPPINGS *indent-guides-mappings*
@@ -203,6 +212,10 @@ Bug reports, feedback, suggestions etc are welcomed.
==============================================================================
7. CHANGELOG *indent-guides-changelog*
1.4~
* Added the new plugin option g:|indent_guides_enable_on_vim_startup|.
* Improved Windows support.
1.3~
* Changed the default value of g:|indent_guides_color_change_percent| to 10.
* Added support for gVim themes that don't specify a `hi Normal guibg`

View File

@@ -45,12 +45,13 @@ let g:indent_guides_color_hex_guibg_pattern = 'guibg=\zs' . g:indent_guides_col
let g:indent_guides_color_name_guibg_pattern = "guibg='\\?\\zs[0-9A-Za-z ]\\+\\ze'\\?"
" Configurable global variables
call s:InitVariable('g:indent_guides_indent_levels', 30)
call s:InitVariable('g:indent_guides_auto_colors', 1 )
call s:InitVariable('g:indent_guides_color_change_percent', 10) " ie. 10%
call s:InitVariable('g:indent_guides_guide_size', 0 )
call s:InitVariable('g:indent_guides_start_level', 1 )
call s:InitVariable('g:indent_guides_debug', 0 )
call s:InitVariable('g:indent_guides_indent_levels', 30)
call s:InitVariable('g:indent_guides_auto_colors', 1 )
call s:InitVariable('g:indent_guides_color_change_percent', 10) " ie. 10%
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 )
" Default mapping
nmap <Leader>ig :IndentGuidesToggle<CR>
@@ -58,6 +59,11 @@ nmap <Leader>ig :IndentGuidesToggle<CR>
" Auto commands
augroup indent_guides
autocmd!
if g:indent_guides_enable_on_vim_startup
autocmd VimEnter * :IndentGuidesEnable
endif
autocmd BufEnter,WinEnter * call indent_guides#process_autocmds()
augroup END