vim-commentary is a lightweight Vim/Neovim plugin that makes commenting code fast and repeatable using familiar operator and motion semantics. Instead of bespoke mappings per language, it works with Vim’s built-in commentstring to apply the right markers for each filetype. You can toggle comments on lines, motions, text objects, and visual selections, which keeps your editing flow consistent with other operators like d, y, and c. The plugin is intentionally minimal, prioritizing speed, correctness, and muscle memory retention over configuration. It integrates naturally with . repeat and respects indentation and block selections to avoid mangling code structure. Because it piggybacks on Vim’s native model, it feels like a built-in that you learn once and use everywhere.

Features

  • Operator-pending comment toggling with motions and text objects
  • Visual-mode support for block and line selections
  • Honors filetype commentstring for correct markers
  • Works with . to repeat the last operation
  • Minimal setup and near-zero configuration
  • Fast, reliable behavior that matches core Vim ergonomics

Project Samples

Project Activity

See All Activity >

Categories

Libraries

Follow commentary.vim

commentary.vim Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New to Google Cloud? Get $300 in credits to explore Compute Engine, BigQuery, Cloud Run, Gemini Enterprise Agent Platform, and more.

Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Claim $300 Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of commentary.vim!

Additional Project Details

Registered

2025-10-28