Added new global option to configure whether the plugin is enabled on Vim startup
This commit is contained in:
parent
0c214805f2
commit
3c86647883
@ -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: 24 Jan 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,9 @@ 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|.
|
||||
|
||||
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`
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user