aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/fixed_join.vim11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugin/fixed_join.vim b/plugin/fixed_join.vim
index 5d1c924..d546aee 100644
--- a/plugin/fixed_join.vim
+++ b/plugin/fixed_join.vim
@@ -34,12 +34,11 @@ function! s:FixedJoin()
endfunction
" Create mapping proxy to the function just defined
-noremap <silent> <unique>
+noremap <silent>
\ <Plug>FixedJoin
\ :<C-U>call <SID>FixedJoin()<CR>
-" If there's no mapping to it already, try to bind normal-mode J to it, to
-" simply replace the old functionality
-nmap <unique>
- \ J
- \ <Plug>FixedJoin
+" If there's no mapping to it already, bind normal J to it
+if !hasmapto('<Plug>FixedJoin')
+ nmap J <Plug>FixedJoin
+endif