diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-23 16:16:14 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-23 16:16:14 +1200 |
commit | 6a28b41738c2140f320c0ca08d3038ee8bf59f4e (patch) | |
tree | 6c73d7e9e7502c72909dfbce2ccab477759d5c11 | |
parent | Use l:cursor_line in :join command build (diff) | |
download | vim-fixed-join-6a28b41738c2140f320c0ca08d3038ee8bf59f4e.tar.gz vim-fixed-join-6a28b41738c2140f320c0ca08d3038ee8bf59f4e.zip |
Adjust map definition codev0.3.0
-rw-r--r-- | plugin/fixed_join.vim | 11 |
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 |