From c8f2f3c089a3f74aed7c72b5c19e55e505fee2b0 Mon Sep 17 00:00:00 2001 From: Alejandro Exojo Date: Wed, 26 Jun 2013 08:28:01 +0200 Subject: [PATCH] Add option g:indent_guides_default_mapping --- doc/indent_guides.txt | 8 ++++++++ plugin/indent_guides.vim | 2 ++ 2 files changed, 10 insertions(+) diff --git a/doc/indent_guides.txt b/doc/indent_guides.txt index 6597bd5..a3b7d9b 100644 --- a/doc/indent_guides.txt +++ b/doc/indent_guides.txt @@ -168,6 +168,14 @@ map it to other keys. For example: :nmap ig IndentGuidesToggle < +The plugin will not provide the default mapping if either: + * You already have something mapped to IndentGuidesToggle. + * You are already using the ig key sequence. + * You set to 0 the variable g:indent_guides_default_mapping: +> + let g:indent_guides_default_mapping=0 +< + You can also map some other commands that are not mapped by default. For example: > diff --git a/plugin/indent_guides.vim b/plugin/indent_guides.vim index 8664add..b966b5c 100644 --- a/plugin/indent_guides.vim +++ b/plugin/indent_guides.vim @@ -53,6 +53,7 @@ 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 ) +call s:InitVariable('g:indent_guides_default_mapping', 1 ) if !exists('g:indent_guides_exclude_filetypes') let g:indent_guides_exclude_filetypes = ['help'] @@ -60,6 +61,7 @@ endif " Default mapping if !hasmapto('IndentGuidesToggle', 'n') && maparg('ig', 'n') == '' + \ && g:indent_guides_default_mapping != 0 nmap ig IndentGuidesToggle endif