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
numToStr avatar

numToStr/Comment.nvim

0
View on GitHub↗
4,589 stars·170 forks·Lua·mit·14 views

Comment.nvim

Comment.nvim is a Neovim plugin for toggling line and block comments in code. It uses a language-aware syntax resolver to determine the correct comment characters based on the active buffer's filetype and a text-object commenting engine to apply these changes across specific code regions using motions.

The plugin features a hook-based action pipeline that executes user-defined pre and post callbacks around core buffer modification operations. It supports Tree-Sitter syntax detection to handle embedded languages within a single file and allows for the definition of custom comment syntax for unsupported file types.

The system provides capabilities for inserting, toggling, and repeating comment operations, including pattern-based line exclusion. It manages these actions through a stateful command stack to enable the immediate re-execution of the most recent comment or uncomment operation.

Features

  • Comment Toggling Utilities - Toggles comments on and off for selected lines or blocks using code-aware movement commands.
  • Comment Syntax Customization - Allows users to define custom comment delimiters for unsupported programming languages or file types.
  • Commenting Engines - Implements distinct logic paths for applying either linewise or blockwise comment styles based on user selection.
  • Language-Aware Syntax Resolvers - Determines the correct comment characters based on the filetype of the active Neovim buffer.
  • Neovim Plugins - Provides an integrated commenting solution specifically for the Neovim text editor.
  • Text Buffer Manipulations - Directly modifies the editor buffer content using Lua API calls to insert or remove comment delimiters.
  • Text-Object Commenting - Toggles comments for specific code regions using cursor motions and text objects like paragraphs or brackets.
  • Buffer Modification Engines - Employs a dedicated engine to apply insert, toggle, and uncomment actions by directly editing the buffer text.
  • Comment Syntax Mappings - Resolves language-specific comment characters at runtime by looking up the buffer filetype in a configuration map.
  • Comment Action Pipelines - Executes user-defined pre and post callbacks around core buffer modification operations to allow behavior extension.
  • Command Re-execution - Enables the immediate re-execution of the most recent comment operation by storing its parameters in a stateful stack.
  • Comment Insertion Utilities - Adds a new comment line before or after the current line and automatically enters edit mode.
  • Comment Mode Selection - Supports both linewise and blockwise commenting depending on the user command or visual mode selection.
  • Language-Specific Configurations - Allows the definition of custom comment delimiters for programming languages not automatically recognized.
  • Repeatable Comment Operations - Stores the parameters of the most recent comment action to facilitate immediate re-execution.
  • Pipeline Lifecycle Hooks - Provides a hook-based pipeline to run user-defined callbacks before and after each comment operation.
  • Embedded Language Detection - Uses Tree-Sitter syntax tree analysis to determine the correct comment markers for embedded languages within a file.
  • Commenting Utilities - Powerful commenting with motion support.

Star history

Star history chart for numtostr/comment.nvimStar history chart for numtostr/comment.nvim

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. 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

Open-source alternatives to Comment.nvim

Similar open-source projects, ranked by how many features they share with Comment.nvim.
  • 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
  • preservim/nerdcommenterpreservim avatar

    preservim/nerdcommenter

    5,004View on GitHub↗

    Nerdcommenter is a Vim commenting plugin and text manipulator designed to automate the insertion, removal, and formatting of language-specific code comments. It serves as a utility for toggling comment markers and aligning comment blocks to improve code organization. The tool provides capabilities for comment state toggling and delimiter switching, allowing users to add or remove markers from single lines or selected blocks of text. It includes features for comment block formatting to ensure visual consistency and the ability to comment out code to disable execution. The plugin covers a broa

    Vim Scriptcommentcommentingvim
    View on GitHub↗5,004
  • tpope/vim-commentarytpope avatar

    tpope/vim-commentary

    6,161View on GitHub↗

    This project is a Vim commenting plugin and language-aware commenter designed to apply file-type specific comment characters to source code. It functions as a text object extension that allows for the toggling of comment markers on selected lines or blocks of text. The plugin utilizes Vim motions and ranges to determine the specific text to be modified, automating the process of adding or removing comment markers. It provides multi-language syntax support by automatically mapping comment characters based on the current file type. Users can define custom comment characters for specific file t

    Vim Script
    View on GitHub↗6,161
  • 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
See all 30 alternatives to Comment.nvim→

Frequently asked questions

What does numtostr/comment.nvim do?

Comment.nvim is a Neovim plugin for toggling line and block comments in code. It uses a language-aware syntax resolver to determine the correct comment characters based on the active buffer's filetype and a text-object commenting engine to apply these changes across specific code regions using motions.

What are the main features of numtostr/comment.nvim?

The main features of numtostr/comment.nvim are: Comment Toggling Utilities, Comment Syntax Customization, Commenting Engines, Language-Aware Syntax Resolvers, Neovim Plugins, Text Buffer Manipulations, Text-Object Commenting, Buffer Modification Engines.

What are some open-source alternatives to numtostr/comment.nvim?

Open-source alternatives to numtostr/comment.nvim include: nvim-mini/mini.nvim — mini.nvim is a comprehensive library of independent modules designed to extend Neovim with a wide array of navigation,… preservim/nerdcommenter — Nerdcommenter is a Vim commenting plugin and text manipulator designed to automate the insertion, removal, and… tpope/vim-commentary — This project is a Vim commenting plugin and language-aware commenter designed to apply file-type specific comment… folke/snacks.nvim — snacks.nvim is a comprehensive collection of quality-of-life plugins and utilities designed to extend the core… folke/todo-comments.nvim — todo-comments.nvim is a Neovim plugin and codebase task navigator that highlights and manages task keywords within… nvim-orgmode/orgmode — Neovim Orgmode is a task management and note-taking environment for Neovim that functions as a plain-text task manager…