Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RRethy/nvim-align
Neovim plugin for aligning text
https://github.com/RRethy/nvim-align
Last synced: 2 months 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 (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T22:21:22.000Z (over 2 years ago)
- Last Synced: 2024-10-27T19:40:32.690Z (2 months ago)
- Language: Lua
- Size: 5.86 KB
- Stars: 40
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- my-neovim-pluginlist - RRethy/nvim-align - align) ![](https://img.shields.io/github/last-commit/RRethy/nvim-align) ![](https://img.shields.io/github/commit-activity/y/RRethy/nvim-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
```