# rhysd/vim-clang-format

Vim plugin for clang-format, a formatter for C, C++, Obj-C, Java, JavaScript, and so on.

Repository: https://github.com/rhysd/vim-clang-format
Canonical: https://ross.abutalabs.com/products/vim-clang-format
Homepage: http://clang.llvm.org/docs/ClangFormat.html
Language: Vim Script
License Family: other
Topics: vim, clang, clang-format, vim-plugin, formatter
Last push: 2022-01-26T12:29:31+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4764, "days_push": 1680, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1098, forks 127 (observed 2026-08-28T04:03:34.934113+00:00)

## What it is
A Vim plugin that integrates the clang-format tool for formatting C, C++, Objective-C, Java, JavaScript, TypeScript, Protobuf, CUDA, and Vala code. It offers commands and operator mappings for whole-buffer, visual-selection, and auto-format-on-write, with style options configurable from .vimrc.

## Use cases
- format C++ code in vim with clang-format
- auto-format buffers on save in vim
- format only selected lines in visual mode
- customize clang-format style options from vimrc
- use clang-format without the python interface
- map a key to format code as an operator

## When to choose
- you use Vim/Neovim and want deep clang-format integration with operator mappings
- you cannot rely on the Python interface required by clang-format.py
- you want style options configurable directly in .vimrc

## When to avoid
- you use another editor like VS Code or Emacs with native clang-format integrations
- you need a formatter for languages outside the C family and clang-format's supported set
- you want an actively developed plugin with recent releases

## Facets
- artifact type: plugin
- maturity: maintenance
- function: formatter, developer-tools
- domain: developer-tools, text-editors, programming-languages
- platform: windows, cli
- tags: vim-plugin, clang-format, code-formatting, c-family, editor-integration, linux, macos

## Member repositories
- rhysd/vim-clang-format (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:34.934113+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-30T06:46:20.127144+00:00, confidence not recorded.
  - readme: https://github.com/rhysd/vim-clang-format (fetched 2026-08-28T04:03:34.934113+00:00, sha 0bee3d5e37ef)
  - homepage: http://clang.llvm.org/docs/ClangFormat.html (fetched 2026-08-29T12:49:38.224678+00:00, sha d96cb2918eec)
  - site_page: https://clang.llvm.org/docs/index.html (fetched 2026-08-29T12:49:38.292575+00:00, sha 77b0f53192c8)
  - site_page: https://clang.llvm.org/docs/ClangCheck.html (fetched 2026-08-29T12:49:38.329712+00:00, sha 7839baa8fd38)
  - site_page: https://clang.llvm.org/docs/ClangFormatStyleOptions.html (fetched 2026-08-29T12:49:38.446190+00:00, sha 50db7dd1a039)
  - site_page: https://clang.llvm.org/docs/LibFormat.html (fetched 2026-08-29T12:49:38.593021+00:00, sha a628de8a51e7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
