# preservim/nerdcommenter

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/preservim-nerdcommenter).**

5,004 stars · 445 forks · Vim Script · CC0-1.0

## Links

- GitHub: https://github.com/preservim/nerdcommenter
- awesome-repositories: https://awesome-repositories.com/repository/preservim-nerdcommenter.md

## Topics

`comment` `commenting` `vim` `vim-plugin` `vim-plugins`

## Description

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 broad range of functional applications, including source code documentation and code logic debugging. It optimizes the Vim workflow by reducing the keystrokes required to manage comment delimiters across various programming languages.

## Tags

### Programming Languages & Runtimes

- [Vim Commenting](https://awesome-repositories.com/f/programming-languages-runtimes/code-commenting/vim-commenting.md) — Manages comment delimiters for single lines or blocks of text across languages within Vim.
- [Code Commenting](https://awesome-repositories.com/f/programming-languages-runtimes/code-commenting.md) — Applies language-specific delimiters to lines or blocks to disable code execution. ([source](https://github.com/preservim/nerdcommenter#readme))
- [Comment Toggling](https://awesome-repositories.com/f/programming-languages-runtimes/code-commenting/comment-toggling.md) — Provides shortcuts to quickly add or remove comment markers to enable or disable logic. ([source](https://github.com/preservim/nerdcommenter/blob/master/README.md))
- [Source Code Documentation](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-documentation.md) — Facilitates the creation of clean, readable documentation blocks within the source code.

### Development Tools & Productivity

- [Comment Insertion Utilities](https://awesome-repositories.com/f/development-tools-productivity/comment-insertion-utilities.md) — Automates the placement of comment markers at the cursor position for creating notes. ([source](https://github.com/preservim/nerdcommenter#readme))
- [Language-Specific Configurations](https://awesome-repositories.com/f/development-tools-productivity/language-specific-configurations.md) — Provides mapping of file types to their specific comment delimiters and formatting rules.
- [Vim Plugins](https://awesome-repositories.com/f/development-tools-productivity/vim-plugins.md) — Extends the Vim editor with specialized capabilities for adding and formatting comments.
- [Code Logic Debugging](https://awesome-repositories.com/f/development-tools-productivity/code-logic-debugging.md) — Enables quick toggling of code sections to test different logic paths without deleting source text.
- [Comment Block Styling](https://awesome-repositories.com/f/development-tools-productivity/comment-formatting-utilities/structured-comment-management/comment-syntax-customization/comment-block-styling.md) — Aligns comment delimiters and organizes text into visually consistent block layouts. ([source](https://github.com/preservim/nerdcommenter#readme))
- [Comment Toggling Utilities](https://awesome-repositories.com/f/development-tools-productivity/comment-toggling-utilities.md) — Toggles between different sets of comment delimiters based on the active file type. ([source](https://github.com/preservim/nerdcommenter#readme))

### User Interface & Experience

- [Comment State Toggles](https://awesome-repositories.com/f/user-interface-experience/user-interaction-patterns/interaction-toggles/interactivity-toggles/transform-logic-toggles/comment-state-toggles.md) — Implements toggle logic to either apply or strip comment markers based on current line state.

### Part of an Awesome List

- [Commenting Workflows](https://awesome-repositories.com/f/awesome-lists/devtools/automation-and-workflow/commenting-workflows.md) — Optimizes the developer workflow by reducing keystrokes needed to manage comment states.

### Software Engineering & Architecture

- [Text Block Formatting](https://awesome-repositories.com/f/software-engineering-architecture/string-formatting-utilities/content-format-transformers/text-block-formatting.md) — Arranges comment blocks into consistent layouts using predefined spacing and delimiter rules.
