Add end of line mappings to J and K
This commit is contained in:
parent
4122b8eda5
commit
c72e01e970
@ -110,6 +110,10 @@ function! EasyMotion#JK(visualmode, direction) " {{{
|
|||||||
call s:EasyMotion('^.\{,' . prev_column . '}\zs\(.\|$\)', a:direction, a:visualmode ? visualmode() : '', '')
|
call s:EasyMotion('^.\{,' . prev_column . '}\zs\(.\|$\)', a:direction, a:visualmode ? visualmode() : '', '')
|
||||||
endif
|
endif
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
|
" -- End of Line Motion ---------------------------
|
||||||
|
function! EasyMotion#Eol(visualmode, direction) " {{{
|
||||||
|
call s:EasyMotion('\(.\)$', a:direction, a:visualmode ? visualmode() : '', '')
|
||||||
|
endfunction " }}}
|
||||||
" -- Search Motion -----------------------
|
" -- Search Motion -----------------------
|
||||||
function! EasyMotion#Search(visualmode, direction) " {{{
|
function! EasyMotion#Search(visualmode, direction) " {{{
|
||||||
call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '')
|
call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '')
|
||||||
|
@ -202,6 +202,15 @@ xnoremap <silent><Plug>(easymotion-k) <Esc>:<C-u>call EasyMotion#JK(1,1)<CR>
|
|||||||
noremap <silent><Plug>(easymotion-bd-jk) :<C-u>call EasyMotion#JK(0,2)<CR>
|
noremap <silent><Plug>(easymotion-bd-jk) :<C-u>call EasyMotion#JK(0,2)<CR>
|
||||||
xnoremap <silent><Plug>(easymotion-bd-jk) <Esc>:<C-u>call EasyMotion#JK(1,2)<CR>
|
xnoremap <silent><Plug>(easymotion-bd-jk) <Esc>:<C-u>call EasyMotion#JK(1,2)<CR>
|
||||||
"}}}
|
"}}}
|
||||||
|
" -- End of Line Motion {{{
|
||||||
|
noremap <silent><Plug>(easymotion-J) :<C-u>call EasyMotion#Eol(0,0)<CR>
|
||||||
|
xnoremap <silent><Plug>(easymotion-J) <Esc>:<C-u>call EasyMotion#Eol(1,0)<CR>
|
||||||
|
noremap <silent><Plug>(easymotion-K) :<C-u>call EasyMotion#Eol(0,1)<CR>
|
||||||
|
xnoremap <silent><Plug>(easymotion-K) <Esc>:<C-u>call EasyMotion#Eol(1,1)<CR>
|
||||||
|
noremap <silent><Plug>(easymotion-bd-JK) :<C-u>call EasyMotion#JK(0,2)<CR>
|
||||||
|
xnoremap <silent><Plug>(easymotion-bd-JK) <Esc>:<C-u>call EasyMotion#JK(1,2)<CR>
|
||||||
|
"}}}
|
||||||
|
|
||||||
|
|
||||||
" -- Search Motion {{{
|
" -- Search Motion {{{
|
||||||
noremap <silent><Plug>(easymotion-n) :<C-u>call EasyMotion#Search(0,0)<CR>
|
noremap <silent><Plug>(easymotion-n) :<C-u>call EasyMotion#Search(0,0)<CR>
|
||||||
@ -307,6 +316,8 @@ if g:EasyMotion_do_mapping == 1 || g:EasyMotion_do_special_mapping == 1
|
|||||||
\ , 'E' : { 'name': 'EW' , 'dir': 0 }
|
\ , 'E' : { 'name': 'EW' , 'dir': 0 }
|
||||||
\ , 'ge': { 'name': 'E' , 'dir': 1 }
|
\ , 'ge': { 'name': 'E' , 'dir': 1 }
|
||||||
\ , 'gE': { 'name': 'EW' , 'dir': 1 }
|
\ , 'gE': { 'name': 'EW' , 'dir': 1 }
|
||||||
|
\ , 'J' : { 'name': 'Eol' , 'dir': 0 }
|
||||||
|
\ , 'K' : { 'name': 'Eol' , 'dir': 1 }
|
||||||
\ , 'j' : { 'name': 'JK' , 'dir': 0 }
|
\ , 'j' : { 'name': 'JK' , 'dir': 0 }
|
||||||
\ , 'k' : { 'name': 'JK' , 'dir': 1 }
|
\ , 'k' : { 'name': 'JK' , 'dir': 1 }
|
||||||
\ , 'n' : { 'name': 'Search' , 'dir': 0 }
|
\ , 'n' : { 'name': 'Search' , 'dir': 0 }
|
||||||
|
Loading…
Reference in New Issue
Block a user