From 69753395d0c3eaecdd1f12c130aa504478d588b0 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Tue, 19 Jan 2016 02:21:44 +0900 Subject: [PATCH] Add document for overwin motions --- doc/easymotion.txt | 107 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 89 insertions(+), 18 deletions(-) diff --git a/doc/easymotion.txt b/doc/easymotion.txt index 7d831f2..a091fe8 100644 --- a/doc/easymotion.txt +++ b/doc/easymotion.txt @@ -217,6 +217,12 @@ EasyMotion table *easymotion-plug-table* (easymotion-Tln) | See |(easymotion-Tln)| (easymotion-bd-tln) | See |(easymotion-bd-tln)| + Over Window Motion | (No assignment by default) + ----------------------------------|--------------------------------- + (easymotion-overwin-f) | See |(easymotion-overwin-f)| + (easymotion-overwin-f2) | See |(easymotion-overwin-f2)| + (easymotion-overwin-line) | See |(easymotion-overwin-line)| + (easymotion-overwin-w) | See |(easymotion-overwin-w)| ------------------------------------------------------------------------------ More mappings *easymotion-more-mappings* @@ -253,6 +259,74 @@ Bidirection ~ (easymotion-bd-n) *(easymotion-bd-n)* Jump to latest "/" or "?" forward. See |n| & |N|. + *easymotion-overwindow-motions* +Overwindow Motions~ + +Overwindow motions supports moving cursor across/over |window|. Since it +doesn't make sense that moving cursor to other window while |Visual| or +|Operator-pending| mode, overwin motions only provides mappings for |Normal| +mode. Please use |nmap| to use overwin motions. Overwindow motions only +supports bi-directional motions. + +(easymotion-overwin-f){char} *n_(easymotion-overwin-f)* + Like |(easymotion-s)| or |(easymotion-bd-f)|, but + supports moving cursor to other window. > + nmap f (easymotion-overwin-f) + xmap f (easymotion-bd-f) + omap f (easymotion-bd-f) +< +(easymotion-overwin-f2){char}{char} *n_(easymotion-overwin-f2)* + Like |(easymotion-s2)| or |(easymotion-bd-f2)|, + but supports moving cursor to other window. > + nmap s (easymotion-overwin-f2) + xmap s (easymotion-bd-f2) + omap s (easymotion-bd-f2) +< +(easymotion-overwin-line) *n_(easymotion-overwin-line)* + Like |(easymotion-bd-jk)| but supports moving cursor to + other window. > + nmap L (easymotion-overwin-line) + xmap L (easymotion-bd-jk) + omap L (easymotion-bd-jk) +< +(easymotion-overwin-w) *n_(easymotion-overwin-w)* + Like |(easymotion-bd-w)| but supports moving cursor to + other window. > + nmap w (easymotion-overwin-w) + xmap w (easymotion-bd-w) + omap w (easymotion-bd-w) +< +For ovrewin n-character find motions~ + *easymotion-do-not-support-overwin-n-char-motions* + Ovrewin n-character find motions is equivalent to + *(easymotion-overwin-sn)* (doesn't exist. It's like + |(easymotion-sn)| but supports moving cursor to other + window). + EasyMotion itself doesn't support this mapping, but with + |incsearch.vim|[1] and incsearch-easymotion.vim[2], you can get + equivalent mappings. incsearch.vim is more compatible with + Vim's default search and it works with EasyMotion. + + [1] https://github.com/haya14busa/incsearch.vim + [2] https://github.com/haya14busa/incsearch-easymotion.vim +> + " You can use other keymappings like instead of if you want to + " use these mappings as default search and somtimes want to move cursor with + " EasyMotion. + function! s:incsearch_config(...) abort + return incsearch#util#deepextend(deepcopy({ + \ 'modules': [incsearch#config#easymotion#module({'overwin': 1)], + \ 'keymap': { + \ "\": '(easymotion)' + \ }, + \ 'is_expr': 0 + \ }), get(a:, 1, {})) + endfunction + + noremap / incsearch#go(incsearch_config()) + noremap ? incsearch#go(incsearch_config({'command': '?'})) + noremap g/ incsearch#go(incsearch_config({'is_stay': 1})) +< Jump To Anywhere ~ (easymotion-jumptoanywhere) *(easymotion-jumptoanywhere)* @@ -490,11 +564,21 @@ Within line motion ~ \ '(\l)\zs(\u)' . '|' . Multi Input Find Motion!~ - *easymotion-multi-input* - *easymotion-two-key* - *easymotion-{find}n* - *(easymotion-{find}n)* - *(easymotion-{find}2)* +All Find motions (s,f,F,t,T,sl,fl,Fl,tl,Tl, see below) support this feature! +(|l| means within line motion) + *easymotion-multi-input* *easymotion-two-key* *easymotion-{find}n* + *(easymotion-{find}n)* *(easymotion-{find}2)* + *(easymotion-s2)* *(easymotion-f2)* *(easymotion-F2)* + *(easymotion-t2)* *(easymotion-T2)* + *(easymotion-bd-f2)* *(easymotion-bd-t2)* + *(easymotion-sl2)* *(easymotion-fl2)* *(easymotion-Fl2)* + *(easymotion-tl2)* *(easymotion-Tl2)* + *(easymotion-bd-fl2)* *(easymotion-bd-tl2)* + + *(easymotion-sn)* *(easymotion-fn)* *(easymotion-Fn)* + *(easymotion-tn)* *(easymotion-Tn)* *(easymotion-bd-tn)* + *(easymotion-sln)* *(easymotion-fln)* *(easymotion-Fln)* + *(easymotion-tln)* *(easymotion-Tln)* *(easymotion-bd-tln)* EasyMotion provide another find motion by multi input target. @@ -529,19 +613,6 @@ keymapping, > let g:EasyMotion_inc_highlight = 0 < -All Find motions (s,f,F,t,T,sl,fl,Fl,tl,Tl, see below) support this feature! -(|l| means within line motion) - - *(easymotion-sn)* *(easymotion-fn)* *(easymotion-Fn)* - *(easymotion-tn)* *(easymotion-Tn)* *(easymotion-bd-tn)* - *(easymotion-sln)* *(easymotion-fln)* *(easymotion-Fln)* - *(easymotion-tln)* *(easymotion-Tln)* *(easymotion-bd-tln)* - - - *(easymotion-s2)* *(easymotion-f2)* *(easymotion-F2)* - *(easymotion-t2)* *(easymotion-T2)* *(easymotion-bd-t2)* - *(easymotion-sl2)* *(easymotion-fl2)* *(easymotion-Fl2)* - *(easymotion-tl2)* *(easymotion-Tl2)* *(easymotion-bd-tl2)* Find Motion Command Line~ *easymotion-command-line*