Skip to content

Commit

Permalink
Don't map extra mappings if already mapped
Browse files Browse the repository at this point in the history
  • Loading branch information
subnut committed Dec 16, 2020
1 parent b18c733 commit b9dae20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/visualstar.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ endif
" Extra mappings
" --------------
if !g:visualstar_extra_mappings_disabled
map <unique> <leader>* <Plug>(VisualstarSearchReplace-*)
map <unique> <leader># <Plug>(VisualstarSearchReplace-#)
" silent! + <unique> = don't map if already mapped to something
silent! map <unique> <leader>* <Plug>(VisualstarSearchReplace-*)
silent! map <unique> <leader># <Plug>(VisualstarSearchReplace-#)
endif

" vim: et ts=2

0 comments on commit b9dae20

Please sign in to comment.