Add EasyMotionSearch function and mapping

Just use the last search to move.

Closes #24.
This commit is contained in:
Maxime Bourget 2011-04-20 14:50:02 +01:00 committed by Kim Silkebækken
parent e28888f4ad
commit b6b7bca4bb

View File

@ -113,6 +113,8 @@
\ , 'gE': { 'name': 'EW' , 'dir': 1 }
\ , 'j' : { 'name': 'JK' , 'dir': 0 }
\ , 'k' : { 'name': 'JK' , 'dir': 1 }
\ , 'n' : { 'name': 'Search' , 'dir': 0 }
\ , 'N' : { 'name': 'Search' , 'dir': 1 }
\ })
" }}}
" }}}
@ -158,6 +160,9 @@
function! EasyMotionJK(visualmode, direction) " {{{
call s:EasyMotion('^\(\w\|\s*\zs\|$\)', a:direction, a:visualmode ? visualmode() : '', '')
endfunction " }}}
function! EasyMotionSearch(visualmode, direction) " {{{
call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '')
endfunction " }}}
" }}}
" Helper functions {{{
function! s:Message(message) " {{{