From f94352bfe7abdef4f6a46a87ebe02cd7b8d9a157 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Mon, 13 Jan 2014 08:15:52 +0900 Subject: [PATCH] Support handling of operator pending mode Use v for characterwise motion --- autoload/EasyMotion.vim | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index 5483bb7..5c372ee 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -1261,22 +1261,18 @@ function! s:EasyMotion(regexp, direction, visualmode, mode, ...) " {{{ exec 'normal! ' . a:visualmode endif " }}} - " -- Handle operator-pending mode -------- {{{ - if a:mode == 'no' - " This mode requires that we eat one more - " character to the right if we're using - " a forward motion - " TODO: support if a:direction == 2 - if a:direction != 1 - let coords[1] += 1 - endif - endif - " }}} - " -- Update cursor position -------------- {{{ call cursor(orig_pos[0], orig_pos[1]) let mark_save = getpos("'e") call setpos("'e", [bufnr('%'), coords[0], coords[1], 0]) + " Handle operator-pending mode {{{ + if a:mode == 'no' + " This mode requires that we eat one more + " character to the right if we're using + " a forward motion + normal! v + endif + " }}} execute 'normal! `e' call setpos("'e", mark_save)