vim-easymotion/doc/easymotion.txt
2014-01-17 15:27:36 +09:00

954 lines
37 KiB
Plaintext

*easymotion.txt* Version 2.0 Last change:17 Jan 2014.
______ __ ___ __ _
/ ____/____ ________ __/ |/ /____ / /_(_)____ ____
/ __/ / __ `/ ___/ / / / /|_/ // __ \/ __/ // __ \/ __ \
/ /___ / /_/ (__ ) /_/ / / / // /_/ / /_/ // /_/ / / / /
/_____/ \__,_/____/\__, /_/ /_/ \____/\__/_/ \____/_/ /_/
/____/
- Vim motions on speed!
==============================================================================
CONTENTS *easymotion-contents*
1. Introduction ....................... |easymotion-introduction|
2. Usage .............................. |easymotion-usage|
2.1 Default mappings ............... |easymotion-default-mappings|
2.2 More mappings .................. |easymotion-more-mappings|
2.3 Special mappings ............... |easymotion-special-mappings|
3. Requirements ....................... |easymotion-requirements|
4. Configuration ...................... |easymotion-configuration|
4.1 EasyMotion_keys ................ |EasyMotion_keys|
4.2 EasyMotion_do_shade ............ |EasyMotion_do_shade|
4.3 EasyMotion_do_mapping .......... |EasyMotion_do_mapping|
4.4 EasyMotion_grouping ............ |EasyMotion_grouping|
4.5 EasyMotion_smartcase ........... |EasyMotion_smartcase|
4.6 EasyMotion_smartsign ........... |EasyMotion_smartsign|
4.7 EasyMotion_use_migemo .......... |EasyMotion_use_migemo|
4.8 EasyMotion_use_upper .......... |EasyMotion_use_upper|
4.9 Custom highlighting ........... |easymotion-custom-hl|
4.10 Custom mappings ............... |easymotion-custom-mappings|
4.10.1 Leader key .............. |easymotion-leader-key|
4.10.2 Custom keys ............. |easymotion-custom-keys|
4.11 Easymotion special functions .. |easymotion-special-mappings|
4.11.1 Select Line ............. |easymotion-select-line|
4.11.2 Select Phrase ........... |easymotion-select-phrase|
4.12 EasyMotion_enter_jump_first ... |EasyMotion_enter_jump_first|
4.13 EasyMotion_prompt ............. |EasyMotion_prompt|
5. License ............................ |easymotion-license|
6. Known bugs ......................... |easymotion-known-bugs|
7. Contributing ....................... |easymotion-contributing|
8. Credits ............................ |easymotion-credits|
==============================================================================
1. Introduction *easymotion* *easymotion-introduction*
EasyMotion provides a much simpler way to use some motions in vim. It takes
the <number> out of <number>w or <number>f{char} by highlighting all possible
choices and allowing you to press one key to jump directly to the target.
When one of the available motions is triggered, all visible text preceding or
following the cursor is faded, and motion targets are highlighted.
==============================================================================
2. Usage *easymotion-usage*
EasyMotion is triggered by one of the provided mappings (see
|easymotion-default-mappings| for details).
Example: >
<cursor>Lorem ipsum dolor sit amet.
Type <Leader><Leader>w to trigger the word motion |w|. See
|easymotion-leader-key| for details about the leader key. When the
motion is triggered, the text is updated (no braces are actually added,
the text is highlighted in red by default): >
<cursor>Lorem {a}psum {b}olor {c}it {d}met.
Press "c" to jump to the beginning of the word "sit": >
Lorem ipsum dolor <cursor>sit amet.
Similarly, if you're looking for an "o", you can use the |f| motion.
Type <Leader><Leader>fo, and all "o" characters are highlighted: >
<cursor>L{a}rem ipsum d{b}l{c}r sit amet.
Press "b" to jump to the second "o": >
Lorem ipsum d<cursor>olor sit amet.
And that's it!
------------------------------------------------------------------------------
2.1 Default mappings *easymotion-default-mappings*
The default configuration defines the following mappings in normal,
visual and operator-pending mode if |g:EasyMotion_do_mapping| is on:
Note: The default leader has been changed to <Leader><Leader> to avoid
conflicts with other plugins you may have installed
Default Mapping | Details
---------------------|----------------------------------------------
<Leader>f{char} | Find {char} to the right. See |f|.
<Leader>F{char} | Find {char} to the left. See |F|.
<Leader>t{char} | Till before the {char} to the right. See |t|.
<Leader>T{char} | Till after the {char} to the left. See |T|.
<Leader>w | Beginning of word forward. See |w|.
<Leader>W | Beginning of WORD forward. See |W|.
<Leader>b | Beginning of word backward. See |b|.
<Leader>B | Beginning of WORD backward. See |B|.
<Leader>e | End of word forward. See |e|.
<Leader>E | End of WORD forward. See |E|.
<Leader>ge | End of word backward. See |ge|.
<Leader>gE | End of WORD backward. See |gE|.
<Leader>j | Line downward. See |j|.
<Leader>k | Line upward. See |k|.
<Leader>n | Jump to latest "/" or "?" forward. See |n|.
<Leader>N | Jump to latest "/" or "?" backward. See |N|.
<Leader>s | Find(Search) {char} forward and backward.
| See |f| and |F|.
<Leader>S | Beginning of word forward and backward.
| See |w| and |b|.
See |easymotion-leader-key| and |mapleader| for details about the leader key.
See |easymotion-custom-mappings| for customizing the default mappings.
EasyMotion <Plug> table *easymotion-plug-table*
<Plug> Mapping Table | Default
---------------------|----------------------------------------------
<Plug>(easymotion-f) | <Leader>f{char}
<Plug>(easymotion-F) | <Leader>F{char}
<Plug>(easymotion-t) | <Leader>t{char}
<Plug>(easymotion-T) | <Leader>T{char}
<Plug>(easymotion-w) | <Leader>w
<Plug>(easymotion-W) | <Leader>W
<Plug>(easymotion-b) | <Leader>b
<Plug>(easymotion-B) | <Leader>B
<Plug>(easymotion-e) | <Leader>e
<Plug>(easymotion-E) | <Leader>E
<Plug>(easymotion-ge)| <Leader>ge
<Plug>(easymotion-gE)| <Leader>gE
<Plug>(easymotion-j) | <Leader>j
<Plug>(easymotion-k) | <Leader>k
<Plug>(easymotion-n) | <Leader>n
<Plug>(easymotion-N) | <Leader>N
<Plug>(easymotion-s) | <Leader>s
<Plug>(easymotion-S) | <Leader>S
More <Plug> Mapping Table | (No assignment by default)
----------------------------------|---------------------------------
<Plug>(easymotion-bd-w) | See |<Plug>(easymotion-bd-w)|
<Plug>(easymotion-bd-W) | See |<Plug>(easymotion-bd-W)|
<Plug>(easymotion-bd-e) | See |<Plug>(easymotion-bd-e)|
<Plug>(easymotion-bd-E) | See |<Plug>(easymotion-bd-E)|
<Plug>(easymotion-bd-jk) | See |<Plug>(easymotion-bd-jk)|
<Plug>(easymotion-bd-n) | See |<Plug>(easymotion-bd-n)|
<Plug>(easymotion-jumptoanywhere) | See |<Plug>(easymotion-jumptoanywhere)|
<Plug>(easymotion-repeat) | See |<Plug>(easymotion-repeat)|
<Plug>(easymotion-next) | See |<Plug>(easymotion-next)|
<Plug>(easymotion-previous) | See |<Plug>(easymotion-previous)|
<Plug>(easymotion-sol-j) | See |<Plug>(easymotion-sol-j)|
<Plug>(easymotion-eol-j) | See |<Plug>(easymotion-eol-j)|
|
Within Line Motion | See |easymotion-within-line|
----------------------------------|---------------------------------
<Plug>(easymotion-sl) | See |<Plug>(easymotion-sl)|
<Plug>(easymotion-fl) | See |<Plug>(easymotion-fl)|
<Plug>(easymotion-Fl) | See |<Plug>(easymotion-Fl)|
<Plug>(easymotion-tl) | See |<Plug>(easymotion-tl)|
<Plug>(easymotion-Tl) | See |<Plug>(easymotion-Tl)|
<Plug>(easymotion-wl) | See |<Plug>(easymotion-wl)|
<Plug>(easymotion-bl) | See |<Plug>(easymotion-bl)|
<Plug>(easymotion-bd-wl) | See |<Plug>(easymotion-bd-wl)|
<Plug>(easymotion-el) | See |<Plug>(easymotion-el)|
<Plug>(easymotion-gel) | See |<Plug>(easymotion-gel)|
<Plug>(easymotion-bd-el) | See |<Plug>(easymotion-bd-el)|
<Plug>(easymotion-lineforward) | See |<Plug>(easymotion-lineforward)|
<Plug>(easymotion-linebackward) | See |<Plug>(easymotion-linebackward)|
<Plug>(easymotion-lineanywhere) | See |<Plug>(easymotion-lineanywhere)|
|
Multi Input Find Motion | See |easymotion-multi-input|
----------------------------------|---------------------------------
<Plug>(easymotion-sn) | See |<Plug>(easymotion-sn)|
<Plug>(easymotion-fn) | See |<Plug>(easymotion-fn)|
<Plug>(easymotion-Fn) | See |<Plug>(easymotion-Fn)|
<Plug>(easymotion-tn) | See |<Plug>(easymotion-tn)|
<Plug>(easymotion-Tn) | See |<Plug>(easymotion-Tn)|
|
<Plug>(easymotion-sln) | See |<Plug>(easymotion-sln)|
<Plug>(easymotion-fln) | See |<Plug>(easymotion-fln)|
<Plug>(easymotion-Fln) | See |<Plug>(easymotion-Fln)|
<Plug>(easymotion-tln) | See |<Plug>(easymotion-tln)|
<Plug>(easymotion-Tln) | See |<Plug>(easymotion-Tln)|
|
Special | See |easymotion-special-mappings|
----------------------------------|---------------------------------
<Plug>(easymotion-special-l) | See |<Plug>(easymotion-special-l)|
<Plug>(easymotion-special-p) | See |<Plug>(easymotion-special-p)|
------------------------------------------------------------------------------
2.2 More mappings *easymotion-more-mappings*
These mappings are not mapped by Default.
Bidirection ~
<Plug>(easymotion-bd-w) *<Plug>(easymotion-bd-w)*
Beginning of word forward and backward. See |w| & |b|.
Note: bd is short for bidirectional
<Plug>(easymotion-bd-W) *<Plug>(easymotion-bd-W)*
Beginning of WORD forward and backward. See |W| & |B|.
<Plug>(easymotion-bd-e) *<Plug>(easymotion-bd-e)*
End of word forward and backward. See |e| & |ge|.
<Plug>(easymotion-bd-E) *<Plug>(easymotion-bd-E)*
End of WORD forward and backward. See |e| & |ge|.
<Plug>(easymotion-bd-jk) *<Plug>(easymotion-bd-jk)*
Line downward and upward. See |j| & |k|.
<Plug>(easymotion-bd-n) *<Plug>(easymotion-bd-n)*
Jump to latest "/" or "?" forward. See |n| & |N|.
Jump To Anywhere ~
<Plug>(easymotion-jumptoanywhere) *<Plug>(easymotion-jumptoanywhere)*
JumpToAnywhere motion!
Default: Beginning and End of word, Camelcase, after '_',
and after '#'.
You can modify this motion behavior by vimrc
|g:EasyMotion_re_anywhere|: *g:EasyMotion_re_anywhere*
>
let g:EasyMotion_re_anywhere = '\v' .
\ '(<.|^$)' . '|' .
\ '(.>|^$)' . '|' .
\ '(\l)\zs(\u)' . '|' .
\ '(_\zs.)' . '|' .
\ '(#\zs.)'
<
Modified example:
>
let g:EasyMotion_re_anywhere = '\v' .
\ '(<.|^)' . '|' .
\ '(<.|.$)' . '|' .
\ '(\l)\zs(\u)' . '|' .
<
Repeat ~
<Plug>(easymotion-repeat) *<Plug>(easymotion-repeat)*
Repeat last motion!
Repeat last motion type including input target character.
Nothing will happen when previous motion doesn't exist.
Last Find Motion~
In Find motion (e.g. |<Plug>(easymoion-s)| ), to type `<CR>`
without input characters invoke last find motion. This
does not repeat motion type (e.g. othrer word motion,
<Plug>(easymotion-j) etc...) but only repeat input
characters.
<Plug>(easymotion-next) *<Plug>(easymotion-next)*
<Plug>(easymotion-prev) *<Plug>(easymotion-prev)*
Jump to next/previous much. Only this motion can be move to offscrren
match. This motion wrap around the end of the file if you set
|'wrapscan'| in your vimrc.
Example:
>
nmap <Leader>; <Plug>(easymotion-next)
nmap <Leader>, <Plug>(easymotion-prev)
<
EasyMotion dot repeat~
*easymotion-dotrepeat* *easymotion-textobjct*
This feature requires tpope/vim-repeat
https://github.com/tpope/vim-repeat
All motion type support '.' repeat.
Example:
>
" vimrc:
omap z <Plug>(easymotion-t)
let g:EasyMotion_keys='hklyuiopnm,qwertzxcvbasdgjf;'
<
Text sample:
>
{cursor}Lorem ipsum dolor sit ame*t*, consectetur adipisicing eli*t*,
sed do eiusmod tempor
<
type `dzt` and type first target marker(in this case, `h`)
>
{cursor}*t*, consectetur adipisicing eli*t,* sed do eiusmod tempor
<
just type '`.`'
>
*t,* sed do eiusmod tempor
<
JK Motion ~
*easymotion-jk-motion*
JK motion option *<Plug>(easymotion-j)* *<Plug>(easymotion-k)*
*g:EasyMotion_startofline*
When using the |j| or |k| motion, the cursor can be configured to stay in
the current column instead of start of line by setting this option to
0. If you want to use both keep cursor colum JK motion and start of
line JK motion, set g:EasyMotion_startofline to 0 to keep cursor
colum JK motion and map |<Plug>(easymotion-sol-j)| &
|<Plug>(easymotion-sol-k)| to use start of line JK motion.
>
let g:EasyMotion_startofline = 0 # keep cursor colum JK motion
map <Leader>J <Plug>(easymoion-sol-j)
map <Leader>K <Plug>(easymoion-sol-K)
<
Default: 1
Start of Line JK motion *<Plug>(easymotion-sol-j)* *<Plug>(easymotion-sol-k)*
Match start of line JK motion
Example:
>
map <Leader>J <Plug>(easymoion-sol-j)
map <Leader>K <Plug>(easymoion-sol-K)
<
End of Line JK motion *<Plug>(easymotion-eol-j)* *<Plug>(easymotion-eol-k)*
Match End of line JK motion
Example:
>
map <Leader>J <Plug>(easymoion-eol-j)
map <Leader>K <Plug>(easymoion-eol-K)
Within line motion ~
*easymotion-within-line*
<Plug>(easymotion-sl) *<Plug>(easymotion-sl)*
This function is same as |<Plug>(easymoion-s)|, except range
is within current cursor line.
<Plug>(easymotion-fl) *<Plug>(easymotion-fl)*
This function is same as |<Plug>(easymoion-f)|, except range
is within current cursor line.
<Plug>(easymotion-Fl) *<Plug>(easymotion-Fl)*
This function is same as |<Plug>(easymoion-F)|, except range
is within current cursor line.
<Plug>(easymotion-tl) *<Plug>(easymotion-tl)*
This function is same as |<Plug>(easymoion-t)|, except range
is within current cursor line.
<Plug>(easymotion-Tl) *<Plug>(easymotion-Tl)*
This function is same as |<Plug>(easymoion-T)|, except range
is within current cursor line.
<Plug>(easymotion-wl) *<Plug>(easymotion-wl)*
This function is same as |<Plug>(easymoion-w)|, except range
is within current cursor line.
<Plug>(easymotion-bl) *<Plug>(easymotion-bl)*
This function is same as |<Plug>(easymoion-b)|, except range
is within current cursor line.
<Plug>(easymotion-bd-wl) *<Plug>(easymotion-bd-wl)*
This function is same as |<Plug>(easymoion-bd-w)|, except range
is within current cursor line.
<Plug>(easymotion-el) *<Plug>(easymotion-el)*
This function is same as |<Plug>(easymoion-e)|, except range
is within current cursor line.
<Plug>(easymotion-gel) *<Plug>(easymotion-gel)*
This function is same as |<Plug>(easymoion-ge)|, except range
is within current cursor line.
<Plug>(easymotion-bd-el) *<Plug>(easymotion-bd-el)*
This function is same as |<Plug>(easymoion-bd-e)|, except range
is within current cursor line.
<Plug>(easymotion-lineforward) *<Plug>(easymotion-lineforward)*
This function is a little same as
|<Plug>(easymotion-jumptoanywhere)|, except range is within
current cursor line and direction is forward.
<Plug>(easymotion-linebackward) *<Plug>(easymotion-linebackward)*
This function is a little same as
|<Plug>(easymotion-jumptoanywhere)|, except range is within
current cursor line and direction is backward.
<Plug>(easymotion-lineanywhere) *<Plug>(easymotion-lineanywhere)*
This function is same as |<Plug>(easymotion-jumptoanywhere)|,
except range is within current cursor line.(bidirectional)
You can customize the behavior of this function by vimrc.
|g:EasyMotion_re_line_anywhere|: *g:EasyMotion_re_line_anywhere*
Default:
>
let g:EasyMotion_re_line_anywhere = '\v' .
\ '(<.|^$)' . '|' .
\ '(.>|^$)' . '|' .
\ '(\l)\zs(\u)' . '|' .
\ '(_\zs.)' . '|' .
\ '(#\zs.)'
<
Modified example:
>
let g:EasyMotion_re_line_anywhere = '\v' .
\ '(<.|^)' . '|' .
\ '(>.|.$)' . '|' .
\ '(\l)\zs(\u)' . '|' .
Multi Input Find Motion!~
*easymotion-multi-input*
*easymotion-{find}n*
*<Plug>(easymotion-{find}n)*
*<Plug>(easymotion-{find}2)*
EasyMotion provide another find motion by multi input target.
Example:
>
nmap s <Plug>(easymoion-s2)
xmap s <Plug>(easymoion-s2)
omap z <Plug>(easymoion-s2)
nmap <Leader>s <Plug>(easymoion-sn)
xmap <Leader>s <Plug>(easymoion-sn)
omap <Leader>z <Plug>(easymoion-sn)
<
If you like typing two or above characters as target similar to vim-smalls or
vim-sneak, |EasyMotion| also provide this feature. With above keymapping,
Invoke EasyMotion by two character:
s{char}{char} (Type s{char}<CR> to use just one {char} is also allowed)
And you can use as much target char as you like:
<Leader>s{char}{char}{char}...<CR>
You can use <C-h> to delete while typing.
All Find motion (s,f,F,t,T,sl,fl,Fl,tl,Tl) support this feature!
(|l| means within line motion)
*<Plug>(easymotion-sn)* *<Plug>(easymotion-fn)* *<Plug>(easymotion-Fn)*
*<Plug>(easymotion-tn)* *<Plug>(easymotion-Tn)* *<Plug>(easymotion-sln)*
*<Plug>(easymotion-fln)* *<Plug>(easymotion-Fln)* *<Plug>(easymotion-tln)*
*<Plug>(easymotion-Tln)*
*<Plug>(easymotion-s2)* *<Plug>(easymotion-f2)* *<Plug>(easymotion-F2)*
*<Plug>(easymotion-t2)* *<Plug>(easymotion-T2)* *<Plug>(easymotion-sl2)*
*<Plug>(easymotion-fl2)* *<Plug>(easymotion-Fl2)* *<Plug>(easymotion-tl2)*
*<Plug>(easymotion-Tl2)*
But |EasyMotion| is good at simple and fast motion with one or two character.
------------------------------------------------------------------------------
2.3 Special mappings *easymotion-special-mappings*
The default configuration defines the following mappings in visual and
operator-pending mode if |g:EasyMotion_do_special_mapping| is on:
>
let g:EasyMotion_do_special_mapping = 1
<
Default: 0
Special Mapping | Details
---------------------|----------------------------------------------
{operator}<Leader>l | Select, yank, paste, delete, or other operation of
| lines. See |<Plug>(easymotion-special-l)|.
{operator}<Leader>p | Select, yank, paste, delete, or other operation of
| phrase. See |<Plug>(easymotion-special-p)|.
or you can map them by yourself
<Plug> Mapping Table | Details
-----------------------------|--------------------------------------
<Plug>(easymotion-special-l) | See |<Plug>(easymotion-special-l)|
<Plug>(easymotion-special-p) | See |<Plug>(easymotion-special-p)|
See |easymotion-leader-key| and |mapleader| for details about the leader key.
==============================================================================
3. Requirements *easymotion-requirements*
EasyMotion has been developed and tested in vim 7.3, but it should run without
any problems in vim 7.2.
Vi-compatible mode must be disabled.
Note: Now @haya14busa maintain EasyMotion in vim 7.4. If there is any
problems, open an issue or pull requests are welcome.
https://github.com/haya14busa/vim-easymotion/issues
==============================================================================
4. Configuration *easymotion-configuration*
EasyMotion will work fine without any configuration, but you can override the
default behavior by setting configuration variables globally in your |vimrc|
file.
Example (this will change the target keys and disable shading): >
let g:EasyMotion_keys = '1234567890'
let g:EasyMotion_do_shade = 0
------------------------------------------------------------------------------
4.1 EasyMotion_keys *EasyMotion_keys*
*g:EasyMotion_keys*
Set the keys which will be used for motion targets. Add as many keys as you
want. There's a lower chance that the motion targets will be grouped if many
keys are available.
Default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
------------------------------------------------------------------------------
4.2 EasyMotion_do_shade *EasyMotion_do_shade*
*g:EasyMotion_do_shade*
The default behavior is to shade the text following the cursor (forward
motions) or preceding the cursor (backward motions) to make the motion targets
more visible. Set this option to 0 if you want to disable text shading.
Default: 1
------------------------------------------------------------------------------
4.3 EasyMotion_do_mapping *EasyMotion_do_mapping*
*g:EasyMotion_do_mapping*
Set this option to 0 if you want to disable the default mappings. See
|easymotion-default-mappings| for details about the default mappings.
Note: If you disable this option, you'll have to map the motions yourself.
See |easymotion-custom-mappings| for customizing the default mappings.
Default: 1
------------------------------------------------------------------------------
4.4 EasyMotion_grouping *EasyMotion_grouping*
*g:EasyMotion_grouping*
When there are too many possible targets on the screen, the results have to be
grouped. This configuration option lets you change which grouping algorithm
you want to use. There are two grouping algorithms available:
* Single-key priority (value: 1)
-------------------
This algorithm prioritizes single-key jumps for the targets closest to
the cursor and only groups the last jump targets to maximize the amount
of single-key jumps.
This algorithm works recursively and will work with as few keys as two.
Example (with |EasyMotion_keys| = "abcdef"): >
x x x x x x x x x
<
The |w| motion is triggered: >
a b c d e f f f f
^ ^ ^ ^ ^ Direct jump to target
^ ^ ^ ^ Enter group "f"
<
* Original (value: 2)
--------
This is the original algorithm which always groups all targets if there
are too many possible motion targets.
Example (with |EasyMotion_keys| = "abcdef"): >
x x x x x x x x x
<
The |w| motion is triggered: >
a a a a a a b b b
^ ^ ^ ^ ^ ^ Enter group "a"
^ ^ ^ Enter group "b"
Default: 1
------------------------------------------------------------------------------
4.5 Smartcase *EasyMotion_smartcase*
*g:EasyMotion_smartcase*
Matching target keys by smartcase. You can type target keys more lazily.
Add following description in your vimrc: >
let g:EasyMotion_smartcase = 1
Default:0
------------------------------------------------------------------------------
4.6 Smartsign *EasyMotion_smartsign*
*g:EasyMotion_use_smartsign_us*
*g:EasyMotion_use_smartsign_ja*
Matching signs target keys by smartcase like. E.g. type '1' and it matches
both '1' and '!' in Find motion.
This feature is depend on keyboard layout, so you must choose which keyboard
layout you use.
How to discriminate:
Shift-2 = @ -> US layout
Shift-2 = " -> JP layout
>
let g:EasyMotion_use_smartsign_us = 1
<
or
>
let g:EasyMotion_use_smartsign_jp = 1
<
Default: 0
------------------------------------------------------------------------------
4.7 Migemo *EasyMotion_use_migemo*
*g:EasyMotion_use_migemo*
|Easymotion| can match multibyte Japanese character with a alphabet input.
For example, '<Leader><Leader>fa' can search 'あ'.
This feature doesn't require |cmigemo| because |Easymotion| includes regex
patterns generated by cmigemo.
Please see http://0xcc.net/migemo/ if you want to know more about migemo.
Add following description in your vimrc: >
let g:EasyMotion_use_migemo = 1
Default:0
This feature is based on rhysd(@Linda_pp)'s clever-f script,
which can be downloaded here:
https://github.com/rhysd/clever-f.vim
------------------------------------------------------------------------------
4.8 Show target key by upper letter *EasyMotion_use_upper*
*g:EasyMotion_use_upper*
|Easymotion| shows target labels by uppercase letter, but you can type it as
lowercase and Easymotion automatically convert it uppercase.
This feature improve targets readability.
Example: >
<cursor>Lorem ipsum dolor sit amet.
Type <Leader><Leader>w and the text is updated: >
<cursor>Lorem {A}psum {B}olor {C}it {D}met.
Press "c" (<- lowercase!) to jump to the beginning of the word "sit": >
Lorem ipsum dolor <cursor>sit amet.
Add following description in your vimrc: >
let g:EasyMotion_use_upper = 1
let g:EasyMotion_keys = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ;'
Default:0
Note: Make sure |g:EasyMotion_keys| doesn't include lowercase
This feature is inspired by t9md's vim-smalls, which can be downloaded here:
https://github.com/t9md/vim-smalls
------------------------------------------------------------------------------
4.9 Custom highlighting *easymotion-custom-hl*
The default EasyMotion configuration uses two highlighting groups that link
to groups with default values. The highlighting groups are:
* EasyMotionTarget
Highlights motion targets, the default value is bold red
* EasyMotionTarget2First
* EasyMotionTarget2Second
Highlights motion targets, when target is two keys
* EasyMotionShade
Highlights shaded text, the default value is dark gray
There are two ways to override the default colors:
1) Set the highlighting in your color scheme
This will only affect a single color scheme. The default red/gray colors
will be used if you change the color scheme to one that doesn't assign
any EasyMotion colors.
Example: >
hi EasyMotionTarget ctermbg=none ctermfg=green
hi EasyMotionShade ctermbg=none ctermfg=blue
hi EasyMotionTarget2First ctermbg=none ctermfg=red
hi EasyMotionTarget2Second ctermbg=none ctermfg=lightred
<
2) Set the highlighting in your vimrc
This is ideal if you want to link the colors to highlighting groups that
are available in almost every color scheme, e.g. |ErrorMsg| (usually
bright red) and Comment (usually faded). You can be sure that the
color scheme's colors will be used instead of the default red/gray
if you choose this option.
Example: >
hi link EasyMotionTarget ErrorMsg
hi link EasyMotionShade Comment
hi link EasyMotionTarget2First MatchParen
hi link EasyMotionTarget2Second MatchParen
<
------------------------------------------------------------------------------
4.10 Custom mappings *easymotion-custom-mappings*
EasyMotion allows you to customize all default mappings to avoid conflicts
with existing mappings. It is possible to change the default leader key
of all mappings to another key or sequence. It is also possible to fine
tune the plugin to your need by changing every single sequence.
4.10.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key*
*<Plug>(easymotion-prefix)*
The default leader key can be changed with the |<Plug>(easymoion-prefix)|
Set this keymapping to the key sequence to use as the prefix of the mappings
described in |easymotion-default-mappings|.
Note: The default leader key has been changed to '<Leader><Leader>' to
avoid conflicts with other plugins. You can revert to the original
leader by setting this keymapping in your vimrc: >
map <Leader> <Plug>(easymoion-prefix)
<
Default: '<Leader><Leader>'
4.10.2 Custom Keys *easymotion-custom-keys*
All custom mappings follow the same format: >
<Plug>(easymotion-{motion})
<
Example: >
map s <Plug>(easymotion-s)
map _f <Plug>(easymotion-f)
map <C-T> <Plug>(easymotion-T)
<
See |easymotion-plug-table| for a table of motions that can be mapped
and their default values.
------------------------------------------------------------------------------
4.11 Easymotion special functions *easymotion-special-function*
4.11.1 Select Line *easymotion-select-line*
*<Plug>(easymotion-special-l)*
SelectLine function which allows you to select any range of lines using two
consecutive easymotion calls.
Default mappings are `c<Leader>l, d<Leader>l, v<Leader>l, y<Leader>l`.
To yank a single line you can either type the same character(s) twice, or use
'.' character.
E.g. `v<Leader>lb.` will select the line with character 'b'.
Note: to promote good Vim habits, you should learn standard movement commands
like `}}, vi(, va(, %, ][, ]], [(, etc.` before resorting to this function.
Set this option to 1 if you want to automatically map this function
Example:
>
let g:EasyMotion_do_special_mapping = 1
Default: 0
or map it by yourself(Recommend)
>
omap <Leader>L <Plug>(easymotion-special-l)
xmap <Leader>L <Plug>(easymotion-special-l)
nmap d<Leader>L <Plug>(easymotion-special-ld)
nmap p<Leader>L <Plug>(easymotion-special-ly)
<
Note: special line function when d & y is a little bit different. So you
should map them individually, don't define omap only.
4.11.2 Select Phrase *easymotion-select-phrase*
*<Plug>(easymotion-special-p)*
(Experimental) SelectPhrase function which allows you to make selection
between any two characters.
Default mapping are `c<Leader>p, d<Leader>p, v<Leader>p, y<Leader>p`.
Example usage: type `v<Leader>p` then press two input characters.
Now the two input characters will be highlight on the same screen, and you can then type two combos to make selection.
Set this option to 1 if you want to automatically map this function
Example: >
let g:EasyMotion_do_special_mapping = 1
Default: 0
or map it by yourself(Recommend)
>
omap <Leader>P <Plug>(easymotion-special-p)
xmap <Leader>P <Plug>(easymotion-special-p)
nmap d<Leader>P <Plug>(easymotion-special-pd)
nmap y<Leader>P <Plug>(easymotion-special-py)
<
Note: special phrase function when d & y is a little bit different. So you
should map them individually, don't define omap only.
------------------------------------------------------------------------------
4.12 Jump to first match by Enter *EasyMotion_enter_jump_first*
*g:EasyMotion_enter_jump_first*
Type Enter key and jump to first match (first letter of |g:EasyMotion_keys| ).
Set this option to 1 if you want to enable this feature.
Example:
>
let g:EasyMotion_enter_jump_first = 1
<
Default: 0
4.13 Customize command line prompt *EasyMotion_prompt*
*g:EasyMotion_prompt*
You can customize command line prompt message in find motion.
`{n}` is how many characters you type, and if {n} == 1 `(s)` will be
ignored.
Sample:
>
let g:EasyMotion_prompt = '{n}>>> '
<
Default:
>
let g:EasyMotion_prompt = 'Search for {n} character(s): '
<
This message will be:
|<Plug>(easymotion-s)| -> 'Search for 1 character: '
|<Plug>(easymotion-s2)| -> 'Search for 2 characters: '
|<Plug>(easymotion-sn)| -> 'Search for characters: '
==============================================================================
5. License *easymotion-license*
Creative Commons Attribution-ShareAlike 3.0 Unported
http://creativecommons.org/licenses/by-sa/3.0/
==============================================================================
6. Known bugs *easymotion-known-bugs*
See: https://github.com/haya14busa/vim-easymotion/issues
and
https://github.com/Lokaltog/vim-easymotion/issues
(@haya14busa and others fix some bugs in this issues)
Pull Requests are welcome! :)
==============================================================================
7. Contributing *easymotion-contributing*
If you experience any bugs or have feature requests, please open an issue on
GitHub. Fork the source repository on GitHub and send a pull request if you
have any code improvements.
Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com>
Source repository: https://github.com/Lokaltog/vim-easymotion
Forked and modified by haya14busa, currently maintain EasyMotion
Author: haya14busa <hayabusa1419@gmail.com>
Source repository: https://github.com/haya14busa/vim-easymotion
==============================================================================
8. Credits *easymotion-credits*
- Ben Boeckel: ge and WORD motions
- Drew Neil: operator-pending mappings
- Rob O'Dwyer: customizable mappings without giving up all defaults
- Michel D'Hooge: customizable leader
- Maxime Bourget: search motion, improved JK motion behavior
- Kearn Holliday: fix jumplist issues
- Shougo Matsushita: fix CSApprox issue
EasyMotion is based on Bartlomiej Podolak's great PreciseJump script, which
can be downloaded here:
http://www.vim.org/scripts/script.php?script_id=3437
------------------------------------------------------------------------------
Forked and modified by haya14busa~
Author: haya14busa <hayabusa1419@gmail.com>
Source repository: https://github.com/haya14busa/vim-easymotion
Ref:~
- supasorn : two key combos and special function
- mtth : startofline(keep column)
- bootleq : fixed bufname bug
- mattn : fix multibyte handling
- yuex : fix visual mode selection bug (o command)
Migemo feature:~
Easymotion migemo function is based on rhysd(@Linda_pp)'s clever-f script,
which can be downloaded here:
https://github.com/rhysd/clever-f.vim
Show uppercase letter and type it as lowercase:~
This feature is inspired by t9md's vim-smalls, which can be downloaded here:
https://github.com/t9md/vim-smalls
==============================================================================
vim:tw=78:sw=4:ts=8:ft=help:norl: