mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-13 04:13:48 -05:00
Field index -> N-th parameter
This commit is contained in:
16
README.md
16
README.md
@@ -56,8 +56,8 @@ variant `:EasyAlign!`) for visual mode.
|
||||
| Mode | Command |
|
||||
| ------------------------- | ------------------------------------------------ |
|
||||
| Interactive mode | `:EasyAlign[!] [OPTIONS]` |
|
||||
| Using predefined rules | `:EasyAlign[!] [FIELD#] DELIMITER_KEY [OPTIONS]` |
|
||||
| Using regular expressions | `:EasyAlign[!] [FIELD#] /REGEXP/ [OPTIONS]` |
|
||||
| Using predefined rules | `:EasyAlign[!] [N-th] DELIMITER_KEY [OPTIONS]` |
|
||||
| Using regular expressions | `:EasyAlign[!] [N-th] /REGEXP/ [OPTIONS]` |
|
||||
|
||||
### Concept of _alignment rule_
|
||||
|
||||
@@ -83,8 +83,8 @@ vnoremap <silent> <Enter> :EasyAlign<cr>
|
||||
With the mapping, you can align selected lines of text with only a few keystrokes.
|
||||
|
||||
1. `<Enter>` key to start interactive EasyAlign command
|
||||
1. Optional Enter keys to select alignment mode (left, right, or center)
|
||||
1. Optional field index (default: 1)
|
||||
1. Optional: Enter keys to select alignment mode (left, right, or center)
|
||||
1. Optional: N-th delimiter (default: 1)
|
||||
- `1` Around the 1st occurrences of delimiters
|
||||
- `2` Around the 2nd occurrences of delimiters
|
||||
- ...
|
||||
@@ -176,10 +176,10 @@ Instead of going into the interactive mode, you can type in arguments to
|
||||
|
||||
```vim
|
||||
" Using predefined alignment rules
|
||||
:EasyAlign[!] [FIELD#] DELIMITER_KEY [OPTIONS]
|
||||
:EasyAlign[!] [N-th] DELIMITER_KEY [OPTIONS]
|
||||
|
||||
" Using arbitrary regular expressions
|
||||
:EasyAlign[!] [FIELD#] /REGEXP/ [OPTIONS]
|
||||
:EasyAlign[!] [N-th] /REGEXP/ [OPTIONS]
|
||||
```
|
||||
|
||||
For example, when aligning the following lines around colons and semi-colons,
|
||||
@@ -247,7 +247,7 @@ my_hash = { :a => 1,
|
||||
```
|
||||
|
||||
However, in this case, we don't really need blockwise visual mode
|
||||
since the same can be easily done using the negative field index: `<Enter>-=`
|
||||
since the same can be easily done using the negative N-th parameter: `<Enter>-=`
|
||||
|
||||
Alignment options
|
||||
-----------------
|
||||
@@ -508,7 +508,7 @@ let g:easy_align_bang_interactive_modes = ['c', 'r']
|
||||
|
||||
### Alignments over multiple occurrences of delimiters
|
||||
|
||||
As stated above, "field index" is used to target specific occurrences of
|
||||
As stated above, "N-th" parameter is used to target specific occurrences of
|
||||
the delimiter when it appears multiple times in each line.
|
||||
|
||||
To recap:
|
||||
|
||||
Reference in New Issue
Block a user