mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-11 03:13:48 -05:00
One-minute guide
This commit is contained in:
29
README.md
29
README.md
@@ -49,20 +49,33 @@ and extract in ~/.vim or
|
|||||||
1. Add `Plug 'junegunn/vim-easy-align'` to .vimrc
|
1. Add `Plug 'junegunn/vim-easy-align'` to .vimrc
|
||||||
2. Run `:PlugInstall`
|
2. Run `:PlugInstall`
|
||||||
|
|
||||||
TL;DR
|
TL;DR - One-minute guide
|
||||||
-----
|
------------------------
|
||||||
|
|
||||||
Define the following mappings in your .vimrc.
|
Define the following mappings in your .vimrc.
|
||||||
(Of course, you are free to change the mapping keys)
|
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" Interactive mode
|
" Start interactive EasyAlign in visual mode
|
||||||
vmap <Enter> <Plug>(EasyAlign)
|
vmap <Enter> <Plug>(EasyAlign)
|
||||||
nmap <leader>a <Plug>(EasyAlign)
|
|
||||||
|
|
||||||
" Live interactive mode (optional)
|
" Start interactive EasyAlign with a Vim movement
|
||||||
vmap <leader><Enter> <Plug>(LiveEasyAlign)
|
nmap <leader>a <Plug>(EasyAlign)
|
||||||
nmap <leader>A <Plug>(LiveEasyAlign)
|
```
|
||||||
|
|
||||||
|
And for the following paragraph, try
|
||||||
|
|
||||||
|
- `vip<Enter>=`
|
||||||
|
- `v`isual-select `i`nner `p`aragraph
|
||||||
|
- Start EasyAlign command (`<Enter>`)
|
||||||
|
- Align around `=`
|
||||||
|
- `<leader>aip=`
|
||||||
|
- Start EasyAlign command (`<Leader>a`) for `i`nner `p`aragraph
|
||||||
|
- Align around `=`
|
||||||
|
|
||||||
|
```
|
||||||
|
apple = red
|
||||||
|
grass=green
|
||||||
|
sky=blue
|
||||||
```
|
```
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
|||||||
Reference in New Issue
Block a user