https://github.com/RRethy/nvim-align
Neovim plugin for aligning text
https://github.com/RRethy/nvim-align
Last synced: 17 days ago
JSON representation
Neovim plugin for aligning text
- Host: GitHub
- URL: https://github.com/RRethy/nvim-align
- Owner: RRethy
- Created: 2021-03-24T00:34:32.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T22:21:22.000Z (over 2 years ago)
- Last Synced: 2025-03-16T21:51:14.701Z (about 1 month ago)
- Language: Lua
- Size: 5.86 KB
- Stars: 46
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- my-neovim-pluginlist - RRethy/nvim-align - align)   (Editing support / Align)
README
# nvim-align
## Usage
```vim
" In visual mode
:'<,'>Align regex_pattern.*
```*Note:* If used in normal mode, the previous visual selection will be used.
*Note:* See help docs for more information.
## Example
Start text:
```text
var x = 1
var xx = 2
var xxx = 3
var xxxx = 4
var xxxxx = 5
var xxxxxx = 6
```Command:
```vim
:'<,'>Align =
```Resulting text:
```text
var x = 1
var xx = 2
var xxx = 3
var xxxx = 4
var xxxxx = 5
var xxxxxx = 6
```You can then operate on the same text again without highlighting it. For example:
```vim
:Align x\s*=
```Resulting in:
```text
var x = 1
var x x = 2
var xx x = 3
var xxx x = 4
var xxxx x = 5
var xxxxxx = 6
```