aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/fixed_join.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/plugin/fixed_join.vim')
-rw-r--r--vim/plugin/fixed_join.vim11
1 files changed, 9 insertions, 2 deletions
diff --git a/vim/plugin/fixed_join.vim b/vim/plugin/fixed_join.vim
index 4c7c7ed4..2c9e1d92 100644
--- a/vim/plugin/fixed_join.vim
+++ b/vim/plugin/fixed_join.vim
@@ -1,6 +1,6 @@
"
-" fixed_join.vim: User-defined key mapping to keep cursor in place when
-" joining lines in normal mode.
+" fixed_join.vim: User-defined key mapping and optional command to keep cursor
+" in place when joining lines in normal mode.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
@@ -31,3 +31,10 @@ endfunction
noremap <silent> <unique>
\ <Plug>FixedJoin
\ :<C-U>call <SID>FixedJoin()<CR>
+
+" Create a command as well in case it's useful
+if has('user_commands')
+ command -nargs=0
+ \ FixedJoin
+ \ call <SID>FixedJoin()
+endif