mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-10 10:53:49 -05:00
Update doc
This commit is contained in:
19
README.md
19
README.md
@@ -6,6 +6,7 @@ A simple, easy-to-use Vim alignment plugin without too much ambition.
|
|||||||
Features:
|
Features:
|
||||||
|
|
||||||
- Optimized for code editing
|
- Optimized for code editing
|
||||||
|
- Requires minimal keystrokes
|
||||||
- Extensible alignment rules
|
- Extensible alignment rules
|
||||||
- Aligns text around either _all or n-th_ occurrence(s) of the delimiter
|
- Aligns text around either _all or n-th_ occurrence(s) of the delimiter
|
||||||
- Ignores comment lines
|
- Ignores comment lines
|
||||||
@@ -54,18 +55,18 @@ With the mapping, you can align selected lines with a few keystrokes.
|
|||||||
- `-` Around the last occurrences of delimiters (`-1`)
|
- `-` Around the last occurrences of delimiters (`-1`)
|
||||||
- `-2` Around the second to last occurrences of delimiters
|
- `-2` Around the second to last occurrences of delimiters
|
||||||
- ...
|
- ...
|
||||||
1. Delimiter (`<space>`, `=`, `:`, `.`, `|`, `,`)
|
1. Delimiter key (a single keystroke; `<space>`, `=`, `:`, `.`, `|`, `,`)
|
||||||
|
|
||||||
Alignment rules for the following delimiters have been defined to meet the most needs.
|
Alignment rules for the following delimiters have been defined to meet the most needs.
|
||||||
|
|
||||||
| Delimiter | Description/Use cases |
|
| Delimiter key | Description/Use cases |
|
||||||
| --------- | ---------------------------------------------------------- |
|
| ------------- | ---------------------------------------------------------- |
|
||||||
| `<space>` | General alignment around spaces |
|
| `<space>` | General alignment around spaces |
|
||||||
| `=` | Operators containing equals sign (=, ==, !=, +=, &&=, ...) |
|
| `=` | Operators containing equals sign (=, ==, !=, +=, &&=, ...) |
|
||||||
| `:` | Suitable for formatting JSON or YAML |
|
| `:` | Suitable for formatting JSON or YAML |
|
||||||
| `.` | Multi-line method chaining |
|
| `.` | Multi-line method chaining |
|
||||||
| `,` | Multi-line method arguments |
|
| `,` | Multi-line method arguments |
|
||||||
| | | Table markdown |
|
| | | Table markdown |
|
||||||
|
|
||||||
### Example command sequences
|
### Example command sequences
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ With this mapping, you can align selected lines with a few keystrokes.
|
|||||||
- Around the last occurrences of delimiters (`-1`)
|
- Around the last occurrences of delimiters (`-1`)
|
||||||
-2 Around the second to last occurrences of delimiters
|
-2 Around the second to last occurrences of delimiters
|
||||||
...
|
...
|
||||||
4. Delimiter
|
4. Delimiter key (a single keystroke)
|
||||||
<space> General alignment around whitespaces
|
<space> General alignment around whitespaces
|
||||||
= Operators containing equals sign (=, ==, !=, +=, &&=, ...)
|
= Operators containing equals sign (=, ==, !=, +=, &&=, ...)
|
||||||
: Suitable for formatting JSON or YAML
|
: Suitable for formatting JSON or YAML
|
||||||
|
|||||||
Reference in New Issue
Block a user