aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/fixed_join.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-05-30 23:56:29 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-05-30 23:56:29 +1200
commitffede2c2898e6b233d01872c24c0d5b286fad8d6 (patch)
treec3799d651df69a74c714bcbe0cfd0939be5044c9 /vim/plugin/fixed_join.vim
parentaa9ecbab88463c6d75e07b9970fae261e55d0c62 (diff)
parent575e5e19908beb64bd501f263130200403f0cd38 (diff)
downloaddotfiles-ffede2c2898e6b233d01872c24c0d5b286fad8d6.tar.gz
dotfiles-ffede2c2898e6b233d01872c24c0d5b286fad8d6.zip
Merge branch 'release/v0.36.0'v0.36.0
* release/v0.36.0: Bump VERSION Separate plugins from colorschemes Spin off toggle_option_flag Vim plugin Spin off fixed_join Vim plugin
Diffstat (limited to 'vim/plugin/fixed_join.vim')
-rw-r--r--vim/plugin/fixed_join.vim45
1 files changed, 0 insertions, 45 deletions
diff --git a/vim/plugin/fixed_join.vim b/vim/plugin/fixed_join.vim
deleted file mode 100644
index 2e7f2abd..00000000
--- a/vim/plugin/fixed_join.vim
+++ /dev/null
@@ -1,45 +0,0 @@
-"
-" 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
-"
-if exists('g:loaded_fixed_join') || &compatible
- finish
-endif
-let g:loaded_fixed_join = 1
-
-" Declare function
-function! s:FixedJoin()
-
- " Save current cursor position
- let l:lc = line('.')
- let l:cc = col('.')
-
- " Build and execute join command
- let l:command = '.,+' . v:count1 . 'join'
- execute l:command
-
- " Restore cursor position
- call cursor(l:lc, l:cc)
-
-endfunction
-
-" Create mapping proxy to the function just defined
-noremap <silent> <unique>
- \ <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
-
-" Create a command as well in case it's useful
-if has('user_commands')
- command -nargs=0
- \ FixedJoin
- \ call <SID>FixedJoin()
-endif