Merge pull request #2 from takac/master

Add end of line mappings to J and K
This commit is contained in:
haya14busa 2014-01-14 16:06:26 -08:00
commit 9496c64ad5
2 changed files with 13 additions and 0 deletions

View File

@ -119,6 +119,10 @@ function! EasyMotion#JK(visualmode, direction) " {{{
call s:EasyMotion('^.\{,' . prev_column . '}\zs\(.\|$\)', a:direction, a:visualmode ? visualmode() : '', '')
endif
endfunction " }}}
" -- End of Line Motion ---------------------------
function! EasyMotion#Eol(visualmode, direction) " {{{
call s:EasyMotion('(\w\|\s*\zs\|.\|^)$', a:direction, a:visualmode ? visualmode() : '', '')
endfunction " }}}
" -- Search Motion -----------------------
function! EasyMotion#Search(visualmode, direction) " {{{
call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '')

View File

@ -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>
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#Eol(0,2)<CR>
xnoremap <silent><Plug>(easymotion-bd-JK) <Esc>:<C-u>call EasyMotion#Eol(1,2)<CR>
"}}}
" -- Search Motion {{{
noremap <silent><Plug>(easymotion-n) :<C-u>call EasyMotion#Search(0,0)<CR>