From b9dae209981e13b1e2691d46e005ff8fe97eb4eb Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Wed, 16 Dec 2020 22:22:14 +0530 Subject: [PATCH] Don't map extra mappings if already mapped --- plugin/visualstar.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/visualstar.vim b/plugin/visualstar.vim index f25d9e9..f7ac278 100644 --- a/plugin/visualstar.vim +++ b/plugin/visualstar.vim @@ -26,8 +26,9 @@ endif " Extra mappings " -------------- if !g:visualstar_extra_mappings_disabled - map * (VisualstarSearchReplace-*) - map # (VisualstarSearchReplace-#) + " silent! + = don't map if already mapped to something + silent! map * (VisualstarSearchReplace-*) + silent! map # (VisualstarSearchReplace-#) endif " vim: et ts=2