1
Fork 0

Setup join mapping.

master
Joshua Potter 2017-07-25 11:18:29 -07:00
parent b2bb146858
commit 64e32d66fa
3 changed files with 10 additions and 4 deletions

View File

@ -7,9 +7,9 @@ CONTENTS *smart-join-contents*
2. Variables .......................................... |smart-join-variables| 2. Variables .......................................... |smart-join-variables|
============================================================================== ==============================================================================
Section 1: Usage *highlight-usage* Section 1: Usage *smart-join-usage*
<Plug>SmartJoin Performs a smart join on [count] line and the one below J Performs a smart join on [count] line and the one below
it. If [count] is too big it is reduced to the number of it. If [count] is too big it is reduced to the number of
lines available. Fails when on the last line of the lines available. Fails when on the last line of the
buffer. buffer.

4
doc/tags Normal file
View File

@ -0,0 +1,4 @@
smart-join join.txt /*smart-join*
smart-join-contents join.txt /*smart-join-contents*
smart-join-usage join.txt /*smart-join-usage*
smart-join-variables join.txt /*smart-join-variables*

View File

@ -123,7 +123,7 @@ endfunction
function! g:SaveCursorSmartJoin(count) function! g:SaveCursorSmartJoin(count)
let l:curpos = getcurpos() let l:curpos = getcurpos()
call s:SmartJoin(a:count - 1) call s:SmartJoin(a:count)
call setpos('.', l:curpos) call setpos('.', l:curpos)
endfunction endfunction
@ -131,5 +131,7 @@ endfunction
" MAPPINGS: {{{1 " MAPPINGS: {{{1
" ============================================================================== " ==============================================================================
noremap <Plug>SmartJoin :<C-U> call g:SaveCursorSmartJoin(v:count1)<CR> nmap <Plug>SmartJoin :<C-U> call g:SaveCursorSmartJoin(v:count1)<CR>
nmap J <Plug>SmartJoin