# tomtom/tcomment_vim

An extensible & universal comment vim-plugin that also handles embedded filetypes

Repository: https://github.com/tomtom/tcomment_vim
Canonical: https://ross.abutalabs.com/products/tcomment_vim
Homepage: http://www.vim.org/scripts/script.php?script_id=1173
Language: Vim Script
License: GPL-3.0
License Family: copyleft
Topics: vim, vim-plugin
Last push: 2024-03-25T10:36:44+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5861, "days_push": 891, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1412, forks 102 (observed 2026-08-28T04:04:39.104863+00:00)

## What it is
tcomment_vim is a Vim plugin that provides easy, file-type-aware commenting and uncommenting of code, working as a toggle with operator, visual, and insert-mode key maps. It supports block, line, and inline comment styles and correctly handles embedded syntaxes such as Ruby or Python regions inside Vim scripts or JavaScript inside PHP.

## Use cases
- toggle comments in vim
- comment out a block of code in vim
- uncomment lines quickly in vim
- comment code with correct syntax per filetype
- handle comments in embedded filetypes like php with html
- add custom comment strings for a filetype

## When to choose
- you edit code in Vim and want fast, reliable comment toggling
- you work with files mixing multiple languages or embedded syntaxes
- you want operator- and motion-based commenting (gc, gcc, gC)
- you need customizable comment definitions per filetype

## When to avoid
- you use Neovim and prefer built-in comment features or Lua-native plugins
- you want an IDE-style GUI commenting menu
- you don't use Vim or Vi-compatible editors

## Facets
- artifact type: plugin
- maturity: stable
- function: editor, developer-tools
- domain: text-editors, developer-tools
- platform: editor-plugin, cross-platform
- tags: vim, commenting, toggle-comments, embedded-syntax, vim-plugin

## Member repositories
- tomtom/tcomment_vim (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:39.104863+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:38:22.284528+00:00, confidence not recorded.
  - readme: https://github.com/tomtom/tcomment_vim (fetched 2026-08-28T04:04:39.104863+00:00, sha 4791a7a3b215)
  - homepage: http://www.vim.org/scripts/script.php?script_id=1173 (fetched 2026-08-29T11:51:27.276971+00:00, sha 2f5cd4c72a72)
  - site_page: https://www.vim.org/about.php (fetched 2026-08-29T11:51:27.280579+00:00, sha 1bd2c1907ce5)
  - site_page: https://www.vim.org/docs.php (fetched 2026-08-29T11:51:27.282726+00:00, sha 438015e9e2e2)
  - site_page: http://www.vim.org/about.php (fetched 2026-08-29T11:51:27.285227+00:00, sha fbe78bde9535)
- Data as of 2026-08-30T08:39:29.467469+00:00.
