From aa0fac362fd06dfffb361c8dc6a5a3be38b16745 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Sat, 21 Dec 2013 23:58:24 +0900 Subject: [PATCH] Improve README --- README.md | 116 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 88 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 92361d8..f75e125 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,14 @@ -# Modifications to Lokaltog's EasyMotion -1. Use one - two character key jump. Display two keys if one-character key is not enough, so you can see what two keys to type without waiting after pressing the first key. -2. Added forward-backward search (bidirectional) search. You can jump forward or backward at the same time. `s`. One useful trick is to map `nmap s` and `vmap s` to use space bar instead and save one keystroke! -3. Added SelectLines function which allows you to select any range of lines using two consecutive easymotion calls. Default mappings are `cl, dl, vl, yl`. To yank a single line you can either type the same character(s) twice, or use '.' character. E.g. `vlb.` 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. -4. (Experimental) Added SelectPhrase function which allows you to make selection between any two characters. Default mapping are `cp, dp, vp, yp`. Example usage: type `vp` 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. -5. Added matching target keys by smartcase option. -6. Added keep cursor column option when JK motion. - -## Animated demonstration - -Two-key combo +# Vim motion on speed! ![two-character key](http://homes.cs.washington.edu/~supasorn/easymotion.gif) -Select lines using `vl` +Original: [Lokaltog/vim-easymotion](https://github.com/Lokaltog/vim-easymotion) - let g:EasyMotion_special_select_line = 1 " Default:0 - let g:EasyMotion_special_mapping_l = '{anykeys}' " Customize keymap +I forked Lokaltog's vim-easymotion and currently maintain it. Fix some bugs, +add new features (based on supasorn's work and others), and improve some function. -![two-character key](http://homes.cs.washington.edu/~supasorn/easymotion2.gif) +I greatly appreciate Lokaltog's and others' works! -Yank lines using `yl`. You can copy lines without moving cursor back and forth between line you want to yank and line you want to paste. - - let g:EasyMotion_special_select_phrase = 1 " Default:0 - let g:EasyMotion_special_mapping_p = '{anykeys}' " Customize keymap - -![two-character key](http://homes.cs.washington.edu/~supasorn/easymotion3.gif) - -This is an alpha version, which breaks multi-byte support, and others. # Introduction EasyMotion provides a much simpler way to use some motions in vim. It @@ -51,7 +33,7 @@ changed back to pre-1.3 behavior by rebinding the leader in your vimrc: All motions are now triggered with `` by default, e.g. `t`, `gE`. -## Usage example +# 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 @@ -74,13 +56,24 @@ Press `b` to jump to the second "o": Jeffrey Way of Nettuts+ has also [written a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/) -about EasyMotion. +about (Lokaltog's) EasyMotion. -## Animated demonstration +# Animated demonstration ![Animated demonstration](http://oi54.tinypic.com/2yysefm.jpg) -## Vim-Lazymotion! +# New feature +Modifications to Lokaltog's EasyMotion + +## Two key combo +1. Use one - two character key jump. Display two keys if one-character key is not enough, so you can see what two keys to type without waiting after pressing the first key. + +![two-character key](http://homes.cs.washington.edu/~supasorn/easymotion.gif) + +## Bidirectional search +Added forward-backward search (bidirectional) search. You can jump forward or backward at the same time by `s`. One useful trick is to map `map (easymotion-s)` to use space bar instead and save one keystroke! + +## Find target by smartcase! Matching target keys by smartcase. You can type targets more lazily. @@ -100,10 +93,77 @@ Press `b` to jump to the second "V": Vim vim VIM. - Add following description in your vimrc: let g:EasyMotion_smartcase = 1 Default:0 +## Migemo feature (for Japanese user) +Easymotion can match multibyte Japanese character with a alphabet input. +For example, 'fa' can search 'あ'. +This feature doesn't require cmigemo because Easymotion includes regex +patterns generated by cmigemo. + +Add following description in your vimrc: + + let g:EasyMotion_use_migemo = 1 + +Default:0 + +## Keep cursor column +Added keep cursor column option when JK motion. + +Add following description in your vimrc: + + let g:EasyMotion_startofline = 0 + +Default:0 + +## Jump to anywhere! +JumpToAnywhere motion! + +Add following description in your vimrc and you can customize this behavior: + + map (easymotion-jumptoanywhere) + let g:EasyMotion_re_anywhere = '\v' . + \ '(<.|^)' . '|' . + \ '(.$)' . '|' . + \ '(\l)\zs(\u)' . '|' . + \ '(_\zs.)' . '|' . + \ '(/\zs.)' . '|' . + \ '(#\zs.)' + +## Select line +Added SelectLines function which allows you to select any range of lines using two consecutive easymotion calls. Default mappings are `cl, dl, vl, yl`(set `let g:EasyMotion_do_special_mapping = 1`, this function is disabled by default). + +To yank a single line you can either type the same character(s) twice, or use '.' character. E.g. `vlb.` 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. + +Select lines using `vl` + +![two-character key](http://homes.cs.washington.edu/~supasorn/easymotion2.gif) + +Yank lines using `yl`. You can copy lines without moving cursor back and forth between line you want to yank and line you want to paste. + +![two-character key](http://homes.cs.washington.edu/~supasorn/easymotion3.gif) + +## Select Phrase +(Experimental) Added SelectPhrase function which allows you to make selection between any two characters. Default mapping are `cp, dp, vp, yp`.(set `let g:EasyMotion_do_special_mapping = 1`, this function is disabled by default) + +Example usage: type `vp` 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. + +## \ mapping support +But I keep backward compatibility, so you can easily move to new easymotion. + +With this `` support, I can easily implement new mapping without +confliction.Such as + +- `(easymotion-bd-w)` + - (bidirectional word motion) +- `(easymotion-jumptoanywhere)` +- and others! See :h easymotion-more-mapping + + +Pull requests are welcome! :)