This commit is contained in:
Junegunn Choi
2013-04-08 00:02:41 +09:00
parent 82b7b8bb85
commit 71209dcdee

View File

@@ -2,20 +2,22 @@ vim-lesser-align
================ ================
Yet another Vim alignment plugin without too much ambition. Yet another Vim alignment plugin without too much ambition.
This plugin clearly has less features than the other pre-existing ones with the similar goals, This plugin clearly has less features than the other pre-existing ones with the similar goals,
but is simpler, easier to use, and good enough for most of the cases. but it is simpler, easier to use, and good enough for most of the cases.
Usage Usage
----- -----
Vim-lesser-align defines `LesserAlign` command in the visual mode. Vim-lesser-align defines `LesserAlign` command in the visual mode.
For convenience, it is advised that you define a mapping for triggering it in your `.vimrc`. For convenience, it is advised that you define a mapping for triggering it in your `.vimrc`.
```vim ```vim
vnoremap <silent> <Enter> :LesserAlign<cr> vnoremap <silent> <Enter> :LesserAlign<cr>
``` ```
Then, a key sequence becomes a combination of 3 parts. Then a key sequence becomes a combination of 3 parts.
1. `<Enter>` 1. `<Enter>`
- Shortcut for `:LesserAssign<Enter>` - Shortcut for `:LesserAssign<Enter>`
@@ -25,23 +27,24 @@ Then, a key sequence becomes a combination of 3 parts.
- `...` - `...`
- `*`: Alignment around all delimiters (tabularize) - `*`: Alignment around all delimiters (tabularize)
1. Delimiter 1. Delimiter
- `=` - `=`: Operators containing equals sign (=, ==, !=, +=, &&=, ...)
- Operators containing equals sign (=, ==, !=, +=, &&=, ...)
- `<space>` - `<space>`
- Space
- `:` - `:`
- `,` - `,`
- `|` - `|`
Examples
--------
| Keystroke | Description | | Keystroke | Description |
| ------------------- | ----------------------------------------------------- | | ------------------- | ----------------------------------------------------- |
| `<Enter>=` | *A*lignment around 1st equals sign (and the likes) | | `<Enter>=` | Alignment around 1st equals sign (and the likes) |
| `<Enter>2=` | *A*lignment around *2*nd equals sign (and the likes) | | `<Enter>2=` | Alignment around 2nd equals sign (and the likes) |
| `<Enter>3=` | *A*lignment around *3*rd equals sign (and the likes) | | `<Enter>3=` | Alignment around 3rd equals sign (and the likes) |
| `<Enter>*=` | *A*lignment around *all* equals signs (and the likes) | | `<Enter>*=` | Alignment around all equals signs (and the likes) |
| `<Enter><space>` | *A*lignment around *1*st whitespace | | `<Enter><space>` | Alignment around 1st whitespace |
| `<Enter>2<space>` | *A*lignment around *2*nd whitespace | | `<Enter>2<space>` | Alignment around 2nd whitespace |
| `<Enter>:` | *A*lignment around *1*st colon | | `<Enter>:` | Alignment around 1st colon |
| ... | ... | | ... | ... |
Author Author