Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Neovim
  3. sort.nvim

sort.nvim

MITLuav2.4.1

A Neovim plugin for intelligent line-wise and delimiter-aware text sorting with natural number handling.

GitHubGitHub
214 stars4 forks0 contributors

What is sort.nvim?

sort.nvim is a Neovim plugin designed for intelligent text sorting within the editor. It enhances Neovim's native sorting by adding delimiter-aware sorting for single lines and supporting natural sorting of numbers within strings. It solves the problem of manually organizing lists, data, or code segments by providing fast, context-aware sorting operations.

Target Audience

Neovim users who frequently work with structured text, such as developers editing configuration files, CSV-like data, lists, or code requiring consistent ordering. It's particularly useful for those who prefer keyboard-driven, motion-based editing workflows.

Value Proposition

Developers choose sort.nvim for its deep integration with Neovim's editing model, offering both familiar commands and powerful motion-based operations. Its unique selling point is the combination of delimiter detection, natural sorting, and Vim-style text objects, which streamlines sorting tasks without interrupting the editing flow.

Overview

Sorting plugin for Neovim that supports line-wise and delimiter sorting.

Use Cases

Best For

  • Sorting comma-separated values (CSV) or pipe-delimited data within a Neovim buffer
  • Organizing lists with version numbers or numeric IDs in natural order
  • Reordering function arguments, import statements, or configuration arrays in code
  • Cleaning up duplicate entries in lists while maintaining sort order
  • Quickly sorting text selections using Vim motions and operators
  • Aligning and sorting table-like data with whitespace or tab delimiters

Not Ideal For

  • Users working exclusively in editors other than Neovim, as the plugin relies on Neovim-specific APIs and Lua integration
  • Projects requiring sorting of large datasets across multiple files or external databases without manual buffer editing
  • Sorting tasks that need custom comparison functions or multi-key sorting beyond delimiter-based and natural sorting, such as locale-aware or regex-based ordering
  • Teams that prefer GUI-based tools or non-keyboard-driven workflows, since it heavily depends on Vim motions and command-line operations

Pros & Cons

Pros

Delimiter Detection

Automatically identifies and sorts by common delimiters like commas, pipes, and spaces, with configurable priority order and single-line adaptation, as shown in the default delimiters list and usage examples.

Natural Number Handling

Supports natural sorting for strings containing numbers via the 'z' flag or configuration, ensuring logical ordering like 'item1, item2, item10', which is particularly useful for version numbers and file names.

Vim-Style Workflows

Integrates seamlessly with Neovim through operators, text objects, and motions like 'go' and dot-repeat functionality, enabling efficient, repeatable sorting without leaving normal mode, as detailed in the mappings table.

Extended Command Interface

Enhances Neovim's built-in :sort command with additional flags and delimiter sorting for single lines, maintaining compatibility while adding features like unique sorting and case-insensitive options.

Cons

Editor Lock-in

Only functions within Neovim, with no support for Vim or other editors, limiting its utility to users committed to the Neovim ecosystem and excluding those on different platforms.

Limited Sorting Flexibility

Lacks support for advanced sorting criteria like custom comparator functions, regex patterns, or multi-column sorting with mixed data types, relying solely on predefined delimiters and natural sorting flags.

Configuration Overhead

Requires understanding of Lua setup and Vim mappings for customization, which can be daunting for casual users or those unfamiliar with Neovim's configuration system, as seen in the optional overrides and mapping examples.

Frequently Asked Questions

Quick Stats

Stars214
Forks4
Contributors0
Open Issues0
Last commit3 months ago
CreatedSince 2021

Tags

#productivity#plugin-management#vim-motions#neovim-plugin#editor-enhancement#natural-sort#lua

Built With

N
Neovim
L
Lua

Included in

Neovim20.6k
Auto-fetched 18 hours ago

Related Projects

nvim-autopairsnvim-autopairs

autopairs for neovim written in lua

Stars4,066
Forks141
Last commit2 months ago
nvim-treesitter-contextnvim-treesitter-context

Show code context

Stars3,215
Forks236
Last commit2 months ago
zen-mode.nvimzen-mode.nvim

🧘 Distraction-free coding for Neovim

Stars2,149
Forks76
Last commit8 months ago
nvim-ts-autotagnvim-ts-autotag

Use treesitter to auto close and auto rename html tag

Stars2,104
Forks109
Last commit3 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub