From 7f20713eb1a2716b75f9597059089790de36614e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adelar=20da=20Silva=20Queir=C3=B3z?= Date: Mon, 10 Jun 2019 11:59:47 -0300 Subject: [PATCH] Ignore mappings if g:no_plugin_maps exists --- plugin/minimap.vim | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/plugin/minimap.vim b/plugin/minimap.vim index fe83e88..46904d5 100644 --- a/plugin/minimap.vim +++ b/plugin/minimap.vim @@ -9,20 +9,22 @@ command! Minimap call minimap#ShowMinimap() command! MinimapClose call minimap#CloseMinimap() command! MinimapUpdate call minimap#UpdateMinimap() -let g:minimap_show = - \ get( g:, 'minimap_show', 'mm' ) -let g:minimap_update = - \ get( g:, 'minimap_update', 'mu' ) -let g:minimap_close = - \ get( g:, 'minimap_close', 'mc' ) -let g:minimap_toggle = - \ get( g:, 'minimap_toggle', 'mt' ) - -execute "nnoremap " . " " . - \ g:minimap_show . " :Minimap" -execute "nnoremap " . " " . - \ g:minimap_update . " :MinimapUpdate" -execute "nnoremap " . " " . - \ g:minimap_close . " :MinimapClose" -execute "nnoremap " . " " . - \ g:minimap_toggle . " :MinimapToggle" +if !exists('g:no_plugin_maps') || g:no_plugin_maps == 0 + let g:minimap_show = + \ get( g:, 'minimap_show', 'mm' ) + let g:minimap_update = + \ get( g:, 'minimap_update', 'mu' ) + let g:minimap_close = + \ get( g:, 'minimap_close', 'mc' ) + let g:minimap_toggle = + \ get( g:, 'minimap_toggle', 'mt' ) + + execute "nnoremap " . " " . + \ g:minimap_show . " :Minimap" + execute "nnoremap " . " " . + \ g:minimap_update . " :MinimapUpdate" + execute "nnoremap " . " " . + \ g:minimap_close . " :MinimapClose" + execute "nnoremap " . " " . + \ g:minimap_toggle . " :MinimapToggle" +endif