finds.dev← search

// the find

junegunn/vim-easy-align

★ 4,239 · Vim Script · updated Jul 2024

:sunflower: A Vim alignment plugin

vim-easy-align is a Vim plugin for aligning text around delimiters — equals signs, colons, pipes, commas, or arbitrary regexes. It works in visual mode, with motions, or via command-line. Aimed at any Vim user who manually spaces out assignments or table columns and is tired of doing it by hand.

The interactive mode is genuinely well-designed: you can preview alignment in real time, cycle through left/right/center, and adjust margins with single keystrokes before committing. Syntax-aware delimiter detection is a real differentiator — it skips delimiters inside strings and comments by default, which means aligning a Ruby hash or YAML file doesn't mangle your comment colons. The N-th occurrence targeting (`2=`, `-=`, `**=`) covers edge cases that most alignment tools ignore, like alternating left-right alignment across multiple delimiters. From junegunn, same author as fzf — the code is clean Vim script with a real test suite using vader.vim.

Vim Script only — no Neovim Lua port, so you're stuck with the legacy plugin ecosystem if your config is Lua-first. The test suite runs via a shell script that assumes a Unix environment; Windows users are on their own. Last meaningful activity was 2024 but the previous few years were sparse — it's effectively in maintenance mode. The option system has three overlapping ways to express the same thing (dictionary, shorthand, interactive keys), which is clever but creates a learning cliff for anything beyond the basic `gaip=` case.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →