Setup join mapping.
parent
b2bb146858
commit
64e32d66fa
|
@ -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.
|
||||||
|
|
|
@ -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*
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue