aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/fixed_join.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-07 13:48:45 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-07 13:48:45 +1300
commite10d9dfb621c210d99aff61fd20de5105455b220 (patch)
treead1cc192db6e8a8c59392c08148c9129cf172453 /vim/plugin/fixed_join.vim
parentMerge branch 'release/v0.10.0' (diff)
parentBump version number to v0.11.0 (diff)
downloaddotfiles-e10d9dfb621c210d99aff61fd20de5105455b220.tar.gz
dotfiles-e10d9dfb621c210d99aff61fd20de5105455b220.zip
Merge branch 'release/v0.11.0'v0.11.0
* release/v0.11.0: Bump version number to v0.11.0 Add user_ftplugin.vim and user_indent.vim plugins Bind <Leader>f to show current 'formatoptions' Add leader bindings for date stamping Use b:undo variables correctly Add \p Vim binding to show filetype Update <Leader>b mapping to use new mapping name Add commands to copy_linebreak.vim Give copy_linebreak.vim enable/disable funcs, maps Add :FixedJoin command Add :StripTrailingWhitespace command Add "do", "then" keywords to Bash completion Break bash/bashrc.d/completion.bash inline lists Use consistent comment layout for Vim plugins Simplify 'formatoptions' config Refactor toggle_option_flag.vim
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 18f563f3..2c9e1d92 100644
--- a/vim/plugin/fixed_join.vim
+++ b/vim/plugin/fixed_join.vim
@@ -1,6 +1,6 @@
"
-" 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