mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-15 05:13:48 -05:00
Usability improvements
- Preserve indentation when a line starts with a delimiter
- Useful for aligning multi-line method chains
- Renamed `margin_{left,right}` to `{left,right}_margin
- Makes it easier to type in (`l`, `r`)
- `margin_{left,right}` is still supported
- Margins can be specified as the number of spaces, or as an arbitrary string
This commit is contained in:
25
EXAMPLES.md
25
EXAMPLES.md
@@ -141,6 +141,31 @@ mysql:
|
||||
|
||||
```
|
||||
|
||||
Formatting multi-line method chaining
|
||||
-------------------------------------
|
||||
|
||||
Try `<Enter>.` or `<Enter>*.` on the following lines.
|
||||
|
||||
```ruby
|
||||
my_object
|
||||
.method1().chain()
|
||||
.second_method().call()
|
||||
.third().call()
|
||||
.method_4().execute()
|
||||
```
|
||||
|
||||
Notice that the indentation is adjusted to match the shortest one among those of
|
||||
the lines starting with the delimiter.
|
||||
|
||||
```ruby
|
||||
my_object
|
||||
.method1() .chain()
|
||||
.second_method().call()
|
||||
.third() .call()
|
||||
.method_4() .execute()
|
||||
```
|
||||
|
||||
|
||||
Partial alignment in block-visual mode / Negative field index
|
||||
-------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user