Improve README

- Add Installation
- Add minimal configuration sample
This commit is contained in:
haya14busa 2014-03-24 06:57:51 +09:00
parent a65668c468
commit b708fca3a2

View File

@ -22,8 +22,8 @@ EasyMotion is now completely
- **Well-behaved**: It's consistent with the default motions of Vim and works - **Well-behaved**: It's consistent with the default motions of Vim and works
well in all modes. And it now supports repeating with the dot operator. well in all modes. And it now supports repeating with the dot operator.
- **Configurable**. You can easily configure its behavior and map it to any key - **Configurable**: You can easily configure its behavior and map it to any key
you want. - **Sofisticated**: Provide flawless, smooth and fast motions with minimal keystrokes
Even though some default behaviors were modified and many new features were Even though some default behaviors were modified and many new features were
added, I carefully considered backward compatibility. So those of you updating added, I carefully considered backward compatibility. So those of you updating
@ -256,3 +256,60 @@ let g:EasyMotion_smartcase = 1
let g:EasyMotion_use_smartsign_us = 1 let g:EasyMotion_use_smartsign_us = 1
``` ```
Installation
------------
### Pathogen (https://github.com/tpope/vim-pathogen)
```
git clone https://github.com/Lokaltog/vim-easymotion ~/.vim/bundle/vim-easymotion
```
### Vundle (https://github.com/gmarik/vundle)
```
Bundle 'Lokaltog/vim-easymotion'
```
### NeoBundle (https://github.com/Shougo/neobundle.vim)
```
NeoBundle 'Lokaltog/vim-easymotion'
```
Minimal Configuration Tutorial
------------------------------
**I recommend to configure and map keys by yourself if you are true Vimmer.**
**Please do not be satisfied with just installing vim-easymotion, configuring it yourself boost your productibity more and more!**
Default `<Leader><Leader>` prefix isn't easy to press, and I leave them just for backwards compatibility.
You should at least change prefix key like this `map <Leader> <Plug>(easymotion-prefix)`
Minimal but useful vimrc example:
```
let g:EasyMotion_do_mapping = 0 " Disable default mappings
" Bi-directional find motion
" Jump to anywhere you want with minimal keystrokes, with just one key binding.
" `s{char}{label}`
nmap s <Plug>(easymotion-s)
" or
" `s{char}{char}{label}`
" Need one more keystroke, but on average, it may be more comfortable.
nmap s <Plug>(easymotion-s2)
" Turn on case sensitive feature
let g:EasyMotion_smartcase = 1
" JK motions: Line motions
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
```
Now, all you need to remember is `s` and JK motions bindings, and it's good enough to boost your cursor speed!
**`s`** is bidirectional find motion, you can move to anywhere with it.
**`<Leader>j`** & **`<Leader>k`** make it easy to move to the lines.
Of course you can use any key you want instead of `s` such as `<Space>`, `<Leader>s`, etc...
If you want to use more useful mappings, please see [:h easymotion.txt](https://github.com/Lokaltog/vim-easymotion/blob/master/doc/easymotion.txt) for more detail.