Update Document drastically!
<Plug> mapping JumpToAnywhere motion and others
This commit is contained in:
parent
7e9a922edd
commit
5173b63a32
@ -1,4 +1,4 @@
|
||||
*easymotion.txt* Version 1.3. Last change: 2013 Oct 5
|
||||
*easymotion.txt* Version 2.0 Last change:21 Dec 2013.
|
||||
|
||||
|
||||
______ __ ___ __ _
|
||||
@ -16,6 +16,8 @@ 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|
|
||||
@ -30,7 +32,6 @@ CONTENTS *easymotion-contents*
|
||||
4.10 Custom mappings ................ |easymotion-custom-mappings|
|
||||
4.10.1 Leader key ............... |easymotion-leader-key|
|
||||
4.10.2 Custom keys .............. |easymotion-custom-keys|
|
||||
4.10.3 Special Custom keys ...... |easymotion-special-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|
|
||||
@ -85,9 +86,12 @@ 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:
|
||||
visual and operator-pending mode if |g:EasyMotion_do_mapping| is on:
|
||||
|
||||
Mapping | Details
|
||||
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|.
|
||||
@ -105,17 +109,127 @@ visual and operator-pending mode:
|
||||
<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|.
|
||||
|
|
||||
Special Mapping | Details
|
||||
---------------------|----------------------------------------------
|
||||
{operator}<Leader>l | Select, yank, paste, delete, or other operation of lines. See |easymotion-special-function|.
|
||||
{operator}<Leader>p | Select, yank, paste, delete, or other operation of phrase. See |easymotion-special-function|.
|
||||
<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)|
|
||||
Special |
|
||||
----------------------------------|---------------------------------
|
||||
<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.
|
||||
|
||||
<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|.
|
||||
|
||||
<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)' . '|' .
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
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.
|
||||
TODO: improvement
|
||||
|
||||
==============================================================================
|
||||
3. Requirements *easymotion-requirements*
|
||||
|
||||
@ -124,6 +238,11 @@ 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*
|
||||
|
||||
@ -138,6 +257,7 @@ Example (this will change the target keys and disable shading): >
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
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
|
||||
@ -147,6 +267,7 @@ 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
|
||||
@ -156,18 +277,19 @@ 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
|
||||
the plugin source code for mapping details. You usually shouldn't need to do
|
||||
this, see |easymotion-custom-mappings| for customizing 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
|
||||
@ -212,6 +334,7 @@ Default: 1
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.5 Start of Line *EasyMotion_startofline*
|
||||
*g:EasyMotion_startofline*
|
||||
|
||||
When using the |j| or |k| motion, the cursor can be configured to stay in the
|
||||
current column (by setting this option to 0) or to move along the first column
|
||||
@ -222,7 +345,8 @@ current column (by setting this option to 0) or to move along the first column
|
||||
Default: 1
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.6 Smartcase *EasyMotion_smartcase*
|
||||
4.6 Smartcase *EasyMotion_smartcase*
|
||||
*g:EasyMotion_smartcase*
|
||||
|
||||
Matching target keys by smartcase. You can type target keys more lazily.
|
||||
|
||||
@ -231,8 +355,10 @@ Add following description in your vimrc: >
|
||||
let g:EasyMotion_smartcase = 1
|
||||
|
||||
Default:0
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.7 Migemo *EasyMotion_use_migemo*
|
||||
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 'あ'.
|
||||
@ -254,8 +380,9 @@ https://github.com/rhysd/clever-f.vim
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.8 Show target key by upper letter *EasyMotion_use_upper*
|
||||
*g:EasyMotion_use_upper*
|
||||
|
||||
|Easymotion| show target label by uppercase letter, but you can type it as
|
||||
|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.
|
||||
@ -279,7 +406,7 @@ Add following description in your vimrc: >
|
||||
|
||||
Default:0
|
||||
|
||||
Note: Make sure g:EasyMotion_keys doesn't include lowercase
|
||||
Note: Make sure |g:EasyMotion_keys| doesn't include lowercase
|
||||
|
||||
This feature is inspired by t9md's vim-smalls, which can be downloaded here:
|
||||
|
||||
@ -336,6 +463,7 @@ There are two ways to override the default colors:
|
||||
hi link EasyMotionTarget2First MatchParen
|
||||
hi link EasyMotionTarget2Second MatchParen
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.10 Custom mappings *easymotion-custom-mappings*
|
||||
|
||||
@ -345,6 +473,7 @@ 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*
|
||||
*g:EasyMotion_leader_key*
|
||||
|
||||
The default leader key can be changed with the configuration option
|
||||
|EasyMotion_leader_key|.
|
||||
@ -362,48 +491,25 @@ Default: '<Leader><Leader>'
|
||||
|
||||
4.10.2 Custom Keys *easymotion-custom-keys*
|
||||
|
||||
All custom mappings follow the same variable format: >
|
||||
All custom mappings follow the same format: >
|
||||
|
||||
EasyMotion_mapping_{motion} = {mapping}
|
||||
<Plug>(easymotion-{motion})
|
||||
<
|
||||
Example: >
|
||||
|
||||
let g:EasyMotion_mapping_f = '_f'
|
||||
let g:EasyMotion_mapping_T = '<C-T>'
|
||||
map _f <Plug>(easymotion-f)
|
||||
map <C-T> <Plug>(easymotion-T)
|
||||
<
|
||||
See |easymotion-default-mappings| for a table of motions that can be mapped
|
||||
See |easymotion-plug-table| for a table of motions that can be mapped
|
||||
and their default values.
|
||||
|
||||
Note: The leader key defined by |EasyMotion_leader_key| is not prepended to
|
||||
your customized mappings! You have to provide full key sequences when setting
|
||||
these options.
|
||||
|
||||
4.10.3 Custom Keys for Special Function *easymotion-special-custom-keys*
|
||||
|
||||
All special custom mappings follow the same variable format: >
|
||||
|
||||
EasyMotion_special_mapping_{motion} = {mapping}
|
||||
<
|
||||
Example: >
|
||||
|
||||
let g:EasyMotion_special_mapping_l = 'L'
|
||||
let g:EasyMotion_special_mapping_p = 'p'
|
||||
<
|
||||
See |easymotion-default-mappings| for a table of motions that can be mapped
|
||||
and their default values.
|
||||
|
||||
Note: The leader key defined by |EasyMotion_leader_key| is not prepended to
|
||||
your customized mappings! You have to provide full key sequences when setting
|
||||
these options.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.11 Easymotion special functions *easymotion-special-function*
|
||||
4.11 Easymotion special functions *easymotion-special-function*
|
||||
|
||||
4.11.1 Select Line *easymotion-select-line*
|
||||
4.11.1 Select Line *easymotion-select-line*
|
||||
*<Plug>(easymotion-special-l)*
|
||||
|
||||
Default: Disabled
|
||||
|
||||
SelectLines function which allows you to select any range of lines using two
|
||||
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`.
|
||||
@ -413,17 +519,29 @@ To yank a single line you can either type the same character(s) twice, or use
|
||||
|
||||
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.
|
||||
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 enable this functions.
|
||||
Set this option to 1 if you want to automatically map this function
|
||||
|
||||
Example: >
|
||||
|
||||
let g:EasyMotion_special_select_line = 1
|
||||
Example:
|
||||
>
|
||||
let g:EasyMotion_do_special_mapping = 1
|
||||
|
||||
Default: 0
|
||||
|
||||
or map it by yourself(Recommend)
|
||||
>
|
||||
omap L <Plug>(easymotion-special-l)
|
||||
xmap L <Plug>(easymotion-special-l)
|
||||
nmap dL d<Plug>(easymotion-special-l)
|
||||
nmap yL y<Plug>(easymotion-special-l)
|
||||
<
|
||||
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.
|
||||
@ -440,6 +558,24 @@ Example: >
|
||||
|
||||
Default: 0
|
||||
|
||||
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 P <Plug>(easymotion-special-p)
|
||||
xmap P <Plug>(easymotion-special-p)
|
||||
nmap dP d<Plug>(easymotion-special-p)
|
||||
nmap yP y<Plug>(easymotion-special-p)
|
||||
<
|
||||
Note: special phrase function when d & y is a little bit different. So you
|
||||
should map them individually, don't define omap only.
|
||||
|
||||
==============================================================================
|
||||
5. License *easymotion-license*
|
||||
|
||||
@ -450,7 +586,12 @@ http://creativecommons.org/licenses/by-sa/3.0/
|
||||
==============================================================================
|
||||
6. Known bugs *easymotion-known-bugs*
|
||||
|
||||
None.
|
||||
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*
|
||||
@ -462,6 +603,12 @@ 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*
|
||||
|
||||
@ -479,24 +626,29 @@ can be downloaded here:
|
||||
http://www.vim.org/scripts/script.php?script_id=3437
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Forked and modified by haya14busa
|
||||
Forked and modified by haya14busa~
|
||||
|
||||
Author: haya14busa <hayabusa1419@gmail.com>
|
||||
Source repository: https://github.com/haya14busa/vim-easymotion
|
||||
|
||||
Ref:
|
||||
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:
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user