diff --git a/README.md b/README.md index 80e06e0..295ce65 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,31 @@ # Introduction -EasyMotion provides a much simpler way to use some motions in vim. It -takes the `` out of `w` or `f{char}` by -highlighting all possible choices and allowing you to press one key to +EasyMotion provides a much simpler way to use some motions in vim. It +takes the `` out of `w` or `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 +When one of the available motions is triggered, all visible text +preceding or following the cursor is faded, and motion targets are highlighted. EasyMotion is triggered by one of the provided mappings. # Important notes about the default bindings -The default bindings may conflict with other plugins you have installed, -e.g. Command-T. Please read the docs about the default bindings, it's -easy to rebind the EasyMotion keys or rebind the leader key in order to -"namespace" the plugin. +The default leader has been changed to `e` to avoid conflicts +with other plugins you may have installed. This can easily be changed +back by rebinding the leader in your vimrc: -You can rebind the leader key in your vimrc: + let g:EasyMotion_leader_key = '' - let g:EasyMotion_leader_key = 'm' - -All the motions will now be triggered with `m` first, e.g. -`mt`, `mgE`. You can also remap single motions: - - let g:EasyMotion_mapping_t = '_t' - let g:EasyMotion_mapping_gE = '_gE' +All motions are now triggered with `e` by default, e.g. +`et`, `egE`. ## Usage example -Type `w` to trigger the word motion `w`. When the motion is -triggered, the text is updated (no braces are actually added, the text +Type `ew` to trigger the word motion `w`. When the motion is +triggered, the text is updated (no braces are actually added, the text is highlighted in red by default): Lorem {a}psum {b}olor {c}it {d}met. @@ -40,8 +34,8 @@ Press `c` to jump to the beginning of the word "sit": Lorem ipsum dolor sit amet. -Similarly, if you're looking for an "o", you can use the `f` motion. -Type `fo`, and all "o" characters are highlighted: +Similarly, if you're looking for an "o", you can use the `f` motion. +Type `efo`, and all "o" characters are highlighted: L{a}rem ipsum d{b}l{c}r sit amet. @@ -49,8 +43,8 @@ Press `b` to jump to the second "o": Lorem ipsum dolor sit amet. -Jeffrey Way of Nettuts+ has also [written -a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/) +Jeffrey Way of Nettuts+ has also [written +a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/) about EasyMotion. ## Animated demonstration diff --git a/doc/easymotion.txt b/doc/easymotion.txt index 0dbf78d..4020b6d 100644 --- a/doc/easymotion.txt +++ b/doc/easymotion.txt @@ -24,6 +24,8 @@ CONTENTS *easymotion-contents* 4.4 EasyMotion_grouping ............ |EasyMotion_grouping| 4.5 Custom highlighting ............ |easymotion-custom-hl| 4.6 Custom mappings ................ |easymotion-custom-mappings| + 4.6.1 Leader key ............... |easymotion-leader-key| + 4.6.2 Custom keys .............. |easymotion-custom-keys| 5. License ............................ |easymotion-license| 6. Known bugs ......................... |easymotion-known-bugs| 7. Contributing ....................... |easymotion-contributing| @@ -49,9 +51,10 @@ Example: > Lorem ipsum dolor sit amet. -Type w to trigger the word motion |w|. See |mapleader| 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): > +Type ew 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): > Lorem {a}psum {b}olor {c}it {d}met. @@ -60,7 +63,7 @@ Press "c" to jump to the beginning of the word "sit": > Lorem ipsum dolor sit amet. Similarly, if you're looking for an "o", you can use the |f| motion. -Type fo, and all "o" characters are highlighted: > +Type efo, and all "o" characters are highlighted: > L{a}rem ipsum d{b}l{c}r sit amet. @@ -92,9 +95,11 @@ visual and operator-pending mode: gE | End of WORD backward. See |gE|. j | Line downward. See |j|. k | Line upward. See |k|. + n | Jump to latest "/" or "?" forward. See |n|. + N | Jump to latest "/" or "?" backward. See |N|. -See |mapleader| for details about the leader key. -See |easymotion-custom-mappings| for customizing default mappings. +See |easymotion-leader-key| and |mapleader| for details about the leader key. +See |easymotion-custom-mappings| for customizing the default mappings. ============================================================================== 3. Requirements *easymotion-requirements* @@ -234,33 +239,43 @@ There are two ways to override the default colors: 4.6 Custom mappings *easymotion-custom-mappings* EasyMotion allows you to customize all default mappings to avoid conflicts -with existing mappings. First, it is possible to change the default -key of all mappings to another key or sequence. It is also possible to fine -tune this plugin to your need by changing every single sequence. +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.6.1 EasyMotion_leader_key *easymotion-leader-key* +4.6.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key* + +The default leader key can be changed with the configuration option +|EasyMotion_leader_key|. Set this option to the key sequence to use as the prefix of the mappings described in |easymotion-default-mappings|. -Default: '' +Note: The default leader key has been changed to 'e' to avoid +conflicts with other plugins. You can revert to the original leader by setting +this option in your vimrc: > -4.6.2 Custom Keys + let g:EasyMotion_leader_key = '' +< +Default: 'e' + +4.6.2 Custom Keys *easymotion-custom-keys* All custom mappings follow the same variable format: > EasyMotion_mapping_{motion} = {mapping} - +< Example: > let g:EasyMotion_mapping_f = '_f' let g:EasyMotion_mapping_T = '' - +< 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 give full key sequences. +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. ============================================================================== 5. License *easymotion-license* @@ -291,6 +306,7 @@ Source repository: https://github.com/Lokaltog/vim-easymotion - 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 EasyMotion is based on Bartlomiej Podolak's great PreciseJump script, which can be downloaded here: