awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
kylechui avatar

kylechui/nvim-surround

0
View on GitHub↗
4,228 stars·79 forks·Lua·MIT·16 views

Nvim Surround

nvim-surround is a Lua-based extension for Neovim designed to add, change, and delete surrounding delimiter pairs around text and code. It functions as a text object manipulator that wraps or removes brackets, quotes, and tags using motions and selections.

The plugin integrates with Tree-sitter to identify structural code nodes, allowing for the precise surrounding of syntax elements based on the structural syntax tree. It also supports custom surround definitions, enabling users to define specialized delimiter pairs and aliases.

The core capability surface covers basic surrounding operations, including adding, changing, and deleting delimiters. It includes support for repeating the most recent surround action to maintain formatting consistency across different text selections.

Features

  • Neovim Plugins - Provides an extension for adding, changing, or removing pairs of brackets and tags within Neovim.
  • Structural Node Querying - Uses Tree-sitter structural node querying to precisely identify and surround complex code blocks.
  • Lua-Based Text Buffer Manipulations - Implements text transformations by calling Lua functions that interface with the Neovim API for buffer editing.
  • Motion-Based Selection - Calculates the target text area by executing Neovim motions before applying surrounding delimiters.
  • Structural Code Wrapping - Wraps code elements in delimiters or changes existing syntax markers to update the structure of a document.
  • Surrounding Character Management - Replaces an existing pair of surrounding characters with a different pair to update text formatting.
  • Text Object Selection - Modifies text by wrapping or removing brackets, quotes, and tags using structural text object selection.
  • Surrounding Text Wrappers - Wraps text, tags, or function calls in balanced pairs of characters based on specified motions.
  • Delimiter-Based Text Modifications - Identifies surrounding characters by comparing text against registered pairs and closing symbols.
  • Surround Management - Adds, changes, and deletes surrounding delimiter pairs around text and code in Neovim.
  • Tree-Sitter Parsers - Determines text boundaries by querying the structural syntax tree using Tree-sitter.
  • Syntax Tree Node Retrieval - Uses Tree-sitter to identify and retrieve structural syntax tree nodes to determine precise text boundaries for surrounding operations.
  • Repeatable Surround Operations - Applies the most recent surrounding operation to a new selection of text to maintain formatting consistency.
  • Custom Surroundings - Allows users to define specialized delimiter pairs and aliases based on custom patterns or syntax nodes.
  • Action Repetition State Tracking - Stores the most recent surround action in a local variable to allow repetition via the dot operator.
  • Configuration Registries - Maps user-defined aliases and patterns to specific delimiter pairs within a central Lua configuration table.
  • Syntax Highlighting - Add, change, or delete surrounding delimiter pairs.

Star history

Star history chart for kylechui/nvim-surroundStar history chart for kylechui/nvim-surround

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does kylechui/nvim-surround do?

nvim-surround is a Lua-based extension for Neovim designed to add, change, and delete surrounding delimiter pairs around text and code. It functions as a text object manipulator that wraps or removes brackets, quotes, and tags using motions and selections.

What are the main features of kylechui/nvim-surround?

The main features of kylechui/nvim-surround are: Neovim Plugins, Structural Node Querying, Lua-Based Text Buffer Manipulations, Motion-Based Selection, Structural Code Wrapping, Surrounding Character Management, Text Object Selection, Surrounding Text Wrappers.

Which projects share features with kylechui/nvim-surround?

Projects with overlapping indexed features include: nvim-mini/mini.nvim — mini.nvim is a comprehensive library of independent modules designed to extend Neovim with a wide array of navigation,… tpope/vim-surround — vim-surround is a plugin for managing pairs of enclosing delimiters within the Vim editor. It functions as a text… nvim-treesitter/nvim-treesitter — This project provides an integration of Tree-sitter into the Neovim editor to enable structural code analysis. It… nvim-orgmode/orgmode — Neovim Orgmode is a task management and note-taking environment for Neovim that functions as a plain-text task manager… folke/snacks.nvim — snacks.nvim is a comprehensive collection of quality-of-life plugins and utilities designed to extend the core… nvim-treesitter/nvim-treesitter-context — nvim-treesitter-context is a Neovim editor extension that provides structural awareness of source files by displaying…

Projects sharing features with Nvim Surround

These projects share indexed features with Nvim Surround. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • nvim-mini/mini.nvimnvim-mini avatar

    nvim-mini/mini.nvim

    9,325View on GitHub↗

    mini.nvim is a comprehensive library of independent modules designed to extend Neovim with a wide array of navigation, user interface, and text manipulation tools. It serves as a modular plugin collection, a UI toolkit for creating custom statuslines and notifications, and a package manager for installing and pinning external plugins from Git. The project provides a specialized fuzzy picker framework for filtering files and symbols, an LSP completion engine with interactive snippet expansion, and a dedicated plugin test framework that uses headless editor instances and remote procedure calls

    Lualuamini-nvimneovim
    View on GitHub↗9,325
  • tpope/vim-surroundtpope avatar

    tpope/vim-surround

    14,078View on GitHub↗

    vim-surround is a plugin for managing pairs of enclosing delimiters within the Vim editor. It functions as a text manipulation tool that automates the addition, removal, and replacement of characters and tags that surround text objects. The tool provides specialized commands to wrap selections, lines, or specific text objects in character pairs such as brackets and quotes. It also enables the replacement of existing delimiters with different pairs or the complete removal of surrounding characters while preserving the internal content. These capabilities extend to markup languages, allowing f

    Vim Script
    View on GitHub↗14,078
  • nvim-treesitter/nvim-treesitternvim-treesitter avatar

    nvim-treesitter/nvim-treesitter

    13,970View on GitHub↗

    This project provides an integration of Tree-sitter into the Neovim editor to enable structural code analysis. It serves as a framework for structural code navigation, context-aware syntax highlighting, and the management of language-specific parsers. The system distinguishes itself through a multi-language injection handler that identifies and parses embedded languages within a single document. It uses a dedicated parser manager to install, update, and remove grammar definitions and their associated query files. The tool covers several capability areas including incremental text selection,

    Tree-sitter Query
    View on GitHub↗13,970
  • folke/snacks.nvimfolke avatar

    folke/snacks.nvim

    7,747View on GitHub↗

    snacks.nvim is a comprehensive collection of quality-of-life plugins and utilities designed to extend the core functionality of Neovim. It serves as a multi-purpose toolkit providing a UI framework, navigation enhancements, and integrations with external services. The project distinguishes itself by combining a wide array of specialized tools into a single suite, including a picker-based file explorer, a deep GitHub integration for managing issues and pull requests, and a set of development utilities for profiling Lua performance and inspecting code execution. Its broader capability surface

    Lua
    View on GitHub↗7,747
  • Compare all 30 related projects→