Allow default mapping to be overridden.

This commit is contained in:
Nate Kane
2012-05-22 08:52:46 +10:00
parent cf6f4d4661
commit c909e3193a
2 changed files with 14 additions and 4 deletions

View File

@@ -55,7 +55,14 @@ call s:InitVariable('g:indent_guides_debug', 0 )
call s:InitVariable('g:indent_guides_space_guides', 1 )
" Default mapping
nmap <Leader>ig :IndentGuidesToggle<CR>
if !hasmapto('<Plug>IndentGuidesToggle')
nmap <silent><unique> <Leader>ig <Plug>IndentGuidesToggle
endif
" Plug mappings
nnoremap <unique><script> <Plug>IndentGuidesToggle :IndentGuidesToggle<CR>
nnoremap <unique><script> <Plug>IndentGuidesEnable :IndentGuidesEnable<CR>
nnoremap <unique><script> <Plug>IndentGuidesDisable :IndentGuidesDisable<CR>
" Auto commands
augroup indent_guides