vim-easymotion/doc/easymotion.txt

202 lines
8.4 KiB
Plaintext
Raw Normal View History

2011-03-31 11:25:05 -04:00
*easymotion.txt* Version 1.1. Last change: 2011 Mar 31
2011-03-28 06:04:43 -04:00
______ __ ___ __ _
/ ____/____ ________ __/ |/ /____ / /_(_)____ ____
/ __/ / __ `/ ___/ / / / /|_/ // __ \/ __/ // __ \/ __ \
/ /___ / /_/ (__ ) /_/ / / / // /_/ / /_/ // /_/ / / / /
/_____/ \__,_/____/\__, /_/ /_/ \____/\__/_/ \____/_/ /_/
/____/
- Vim motions on speed!
==============================================================================
CONTENTS *easymotion-contents*
1. Introduction ....................... |easymotion-introduction|
2. Usage .............................. |easymotion-usage|
2011-03-31 02:23:40 -04:00
2.1 Default mappings ............... |easymotion-default-mappings|
2011-03-28 06:04:43 -04:00
3. Requirements ....................... |easymotion-requirements|
4. Configuration ...................... |easymotion-configuration|
4.1 EasyMotion_keys ................ |EasyMotion_keys|
4.2 EasyMotion_target_hl ........... |EasyMotion_target_hl|
4.3 EasyMotion_shade_hl ............ |EasyMotion_shade_hl|
4.4 EasyMotion_do_shade ............ |EasyMotion_do_shade|
4.5 EasyMotion_do_mapping .......... |EasyMotion_do_mapping|
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*
2011-03-31 02:23:40 -04:00
EasyMotion is triggered by one of the provided mappings (see
2011-03-29 09:40:20 -04:00
|EasyMotion_do_mapping| for details).
2011-03-28 06:04:43 -04:00
Example: >
2011-03-31 02:23:40 -04:00
<cursor>Lorem ipsum dolor sit amet.
2011-03-28 06:04:43 -04:00
2011-03-31 02:23:40 -04:00
Type <Leader>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): >
2011-03-28 06:04:43 -04:00
2011-03-31 02:23:40 -04:00
<cursor>Lorem {a}psum {b}olor {c}it {d}met.
2011-03-28 06:04:43 -04:00
2011-03-29 09:40:20 -04:00
Press "c" to jump to the beginning of the word "sit": >
2011-03-28 06:04:43 -04:00
2011-03-31 02:23:40 -04:00
Lorem ipsum dolor <cursor>sit amet.
Similarly, if you're looking for an "o", you can use the |f| motion.
Type <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.
2011-03-28 06:04:43 -04:00
And that's it!
2011-03-31 02:23:40 -04:00
------------------------------------------------------------------------------
2.1 Default mappings *easymotion-default-mappings*
2011-03-31 11:24:55 -04:00
The default configuration defines the following mappings in normal,
visual and operator-pending mode:
2011-03-31 02:23:40 -04:00
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>b | Beginning of word backward. See |b|.
<Leader>e | End of word forward. See |e|.
<Leader>ge | End of word backward. See |ge| .
<Leader>j | Line downward. See |j|.
<Leader>k | Line upward. See |k|.
See |mapleader| for details about the leader key.
2011-03-28 06:04:43 -04:00
==============================================================================
3. Requirements *easymotion-requirements*
2011-03-29 09:40:20 -04:00
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.
2011-03-28 06:04:43 -04:00
==============================================================================
4. Configuration *easymotion-configuration*
2011-03-31 02:23:40 -04:00
EasyMotion will work fine without any configuration, but you can override the
default behavior by setting configuration variables globally in your |vimrc|
file.
2011-03-29 09:40:20 -04:00
2011-03-31 02:23:40 -04:00
Example (this will change the target keys and disable shading): >
2011-03-29 09:40:20 -04:00
2011-03-31 02:23:40 -04:00
let g:EasyMotion_keys = '1234567890'
let g:EasyMotion_do_shade = 0
2011-03-29 09:40:20 -04:00
2011-03-28 06:04:43 -04:00
------------------------------------------------------------------------------
4.1 EasyMotion_keys *EasyMotion_keys*
2011-03-29 09:40:20 -04:00
Set the keys which will be used for motion targets. Add as many keys as you
2011-03-31 02:23:40 -04:00
want. There's a lower chance that the motion targets will be grouped if many
keys are available.
2011-03-28 06:04:43 -04:00
Default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
------------------------------------------------------------------------------
4.2 EasyMotion_target_hl *EasyMotion_target_hl*
2011-03-31 02:23:40 -04:00
Set the highlighting group for motion targets. You can override the default
target highlighting by either changing this variable to another highlighting
group (e.g. |ErrorMsg|), or by using |hi| to override the default syntax
colors: >
hi EasyMotionTarget ctermfg=green ctermbg=black cterm=reverse
2011-03-28 06:04:43 -04:00
Default: 'EasyMotionTarget'
------------------------------------------------------------------------------
4.3 EasyMotion_shade_hl *EasyMotion_shade_hl*
2011-03-31 02:23:40 -04:00
Set the highlighting group for shaded text (see |EasyMotion_do_shade|). You
can override the default shade highlighting by either changing this variable
to another highlighting group, or by using |hi| to override the default syntax
colors: >
hi EasyMotionShade ctermfg=red ctermbg=black cterm=none
2011-03-28 06:04:43 -04:00
Default: 'EasyMotionShade'
------------------------------------------------------------------------------
4.4 EasyMotion_do_shade *EasyMotion_do_shade*
2011-03-31 02:23:40 -04:00
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.
2011-03-28 06:04:43 -04:00
Default: 1
------------------------------------------------------------------------------
4.5 EasyMotion_do_mapping *EasyMotion_do_mapping*
2011-03-31 02:23:40 -04:00
Set this option to 0 if you want to disable the default mappings. See
|easymotion-default-mappings| for details about the default mappings.
2011-03-29 09:40:20 -04:00
Note: If you disable this option, you'll have to map the motions yourself. See
the plugin source code for mapping details.
2011-03-31 02:23:40 -04:00
Default: 1
2011-03-28 06:04:43 -04:00
==============================================================================
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*
2011-03-30 12:49:13 -04:00
- Lines jump to the left when usin j/k motions when a line is prepended
by a hard tab due to the tab being replaced with the marker character.
2011-03-28 06:04:43 -04:00
==============================================================================
7. Contributing *easymotion-contributing*
2011-03-29 09:40:20 -04:00
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.
2011-03-28 06:04:43 -04:00
2011-03-29 08:10:00 -04:00
Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com>
Source repository: https://github.com/Lokaltog/vim-easymotion
2011-03-28 06:04:43 -04:00
==============================================================================
8. Credits *easymotion-credits*
2011-03-30 11:59:53 -04:00
- Ben Boeckel: ge motion
2011-03-31 11:20:49 -04:00
- Drew Neil: operator-pending mappings
2011-03-30 11:59:53 -04:00
2011-03-28 06:04:43 -04:00
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
==============================================================================
vim:tw=78:sw=4:ts=8:ft=help:norl: