diff --git a/doc/indent_guides.txt b/doc/indent_guides.txt index 4b49283..9a208be 100644 --- a/doc/indent_guides.txt +++ b/doc/indent_guides.txt @@ -156,14 +156,14 @@ Default: 0. Values: 0 or 1. The default mapping for toggling indent guides is ig. You can easily map it to other keys. For example: > - :nmap ig :IndentGuidesToggle + :nmap ig IndentGuidesToggle < You can also map some other commands that are not mapped by default. For example: > - :nmap ie :IndentGuidesEnable - :nmap id :IndentGuidesDisable + :nmap ie IndentGuidesEnable + :nmap id IndentGuidesDisable < ============================================================================== @@ -226,6 +226,9 @@ Bug reports, feedback, suggestions etc are welcomed. ============================================================================== 7. CHANGELOG *indent-guides-changelog* +1.7 (pending release)~ + * Added way to override the default mapping (thanks xuhdev). + 1.6~ * Added option g:|indent_guides_space_guides| to control whether spaces are considered as indention (thanks scoz). diff --git a/plugin/indent_guides.vim b/plugin/indent_guides.vim index c8594c5..fc6450c 100644 --- a/plugin/indent_guides.vim +++ b/plugin/indent_guides.vim @@ -55,7 +55,14 @@ call s:InitVariable('g:indent_guides_debug', 0 ) call s:InitVariable('g:indent_guides_space_guides', 1 ) " Default mapping -nmap ig :IndentGuidesToggle +if !hasmapto('IndentGuidesToggle') + nmap ig IndentGuidesToggle +endif + +" Plug mappings +nnoremap