From 4465876cdc01321e20cf93f1b291678abd4d88dc Mon Sep 17 00:00:00 2001 From: Kevin Johnson Date: Fri, 17 Apr 2015 22:52:33 -0700 Subject: [PATCH] fix Next, Previous motions Unlike all other motions, they have no in visual mode, so they are handled outside the helper function. --- plugin/EasyMotion.vim | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/plugin/EasyMotion.vim b/plugin/EasyMotion.vim index ad3bafe..e8293b3 100644 --- a/plugin/EasyMotion.vim +++ b/plugin/EasyMotion.vim @@ -184,13 +184,6 @@ call s:motion_map_helper({ \ }) "}}} -" -- Next, Previous Motion {{{ -call s:motion_map_helper({ - \ 'next' : {'fnc' : 'NextPrevious', 'direction': 0}, - \ 'previous' : {'fnc' : 'NextPrevious', 'direction': 1}, - \ }) -"}}} - " -- Line Motion {{{ call s:motion_map_helper({ \ 'wl' : {'fnc' : 'WBL', 'direction': 0}, @@ -205,6 +198,18 @@ call s:motion_map_helper({ \ }) "}}} +" -- Next, Previous Motion {{{ +noremap (easymotion-next) + \ :call EasyMotion#NextPrevious(0,0) +xnoremap (easymotion-next) + \ :call EasyMotion#NextPrevious(1,0) + +noremap (easymotion-prev) + \ :call EasyMotion#NextPrevious(0,1) +xnoremap (easymotion-prev) + \ :call EasyMotion#NextPrevious(1,1) +"}}} + " -- Repeat Motion {{{ noremap (easymotion-repeat) \ :call EasyMotion#Repeat(0)