# google/vim-codefmt

**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/google-vim-codefmt).**

1,119 stars · 101 forks · Vim Script · Apache-2.0

## Links

- GitHub: https://github.com/google/vim-codefmt
- awesome-repositories: https://awesome-repositories.com/repository/google-vim-codefmt.md

## Topics

`clang-format` `formatter` `js-beautify` `vim`

## Description

Vim-codefmt is a plugin for the Vim text editor that automates source code formatting by integrating external command-line utilities. It functions as a bridge between the editor and specialized formatting tools, allowing developers to maintain consistent style across diverse programming languages through a unified interface.

The plugin operates by invoking external processes to transform buffer content, utilizing standard input and output streams to exchange data. It supports both full-file formatting and targeted adjustments for specific code ranges, ensuring that style enforcement can be applied precisely where needed.

Users can configure the plugin to trigger formatting automatically upon saving a file, which helps maintain project-wide consistency without manual intervention. The system is designed for extensibility, allowing for the registration of custom formatting scripts or proprietary tools to accommodate unique language requirements or non-standard coding conventions. It also includes error handling to capture and report issues encountered during the formatting process.

## Tags

### Development Tools & Productivity

- [Editor Extensions](https://awesome-repositories.com/f/development-tools-productivity/editor-extensions.md) — Extends editor functionality to support syntax-aware code cleanup and range-based formatting for multiple programming languages.
- [Vim Plugins](https://awesome-repositories.com/f/development-tools-productivity/vim-plugins.md) — Automates source code formatting by integrating external command-line utilities directly into the text editor workflow.
- [Vim Plugins](https://awesome-repositories.com/f/development-tools-productivity/code-editors-ides/extension-ecosystems-management/editor-extensions/editor-integrations/vim-plugins.md) — Extends the functionality of the text editor to integrate external tools and automate repetitive development tasks.
- [Style Rule Configurations](https://awesome-repositories.com/f/development-tools-productivity/command-line-configuration/style-rule-configurations.md) — Adjusts specific style settings through a centralized configuration file to ensure output matches project requirements. ([source](https://github.com/google/vim-codefmt#readme))
- [Custom Tool Integrations](https://awesome-repositories.com/f/development-tools-productivity/custom-tool-integrations.md) — Connects proprietary or project-specific formatting scripts into the development environment to enforce unique style requirements.
- [Development Workflow Automation](https://awesome-repositories.com/f/development-tools-productivity/development-workflow-automation.md) — Maintains consistent project style by triggering automated formatting tasks and reporting errors during the file saving process.
- [Language Support Extensions](https://awesome-repositories.com/f/development-tools-productivity/language-support-extensions.md) — Defines new interface extensions and executable paths to add support for additional languages or formatting utilities. ([source](https://github.com/google/vim-codefmt#readme))
- [Line Range Formatting](https://awesome-repositories.com/f/development-tools-productivity/line-range-formatting.md) — Applies style adjustments only to highlighted lines or specific blocks defined by the user. ([source](https://github.com/google/vim-codefmt/wiki/Formatter-Integration-Guide))

### Part of an Awesome List

- [Code Formatting](https://awesome-repositories.com/f/awesome-lists/devtools/code-formatting.md) — Ensures consistent source code style across a project by automatically applying formatting rules whenever files are saved.
- [On-Save Formatting](https://awesome-repositories.com/f/awesome-lists/devtools/code-formatting/on-save-formatting.md) — Executes automatic style adjustments whenever a file is saved to ensure consistent formatting without manual effort. ([source](https://github.com/google/vim-codefmt/wiki/Formatter-Integration-Guide))

### Software Engineering & Architecture

- [Source Code Formatting](https://awesome-repositories.com/f/software-engineering-architecture/source-code-formatting.md) — Cleans up source code automatically every time a file is saved to maintain consistent project style. ([source](https://github.com/google/vim-codefmt#readme))
- [Proxy Capability Extenders](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/developer-authoring-interfaces/custom-module-implementations/module-functionality-extenders/plugin-extenders/proxy-capability-extenders.md) — Connects proprietary or specialized formatting tools into the development environment to support unique languages. ([source](https://github.com/google/vim-codefmt/wiki/Formatter-Integration-Guide))

### Programming Languages & Runtimes

- [Cross-Language Workflows](https://awesome-repositories.com/f/programming-languages-runtimes/language-development-environments/cross-language-workflows.md) — Standardizes code readability across diverse programming languages by connecting specialized formatting utilities to a unified interface.
- [Source Code Formatters](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-formatters.md) — Applies language-specific style rules to code buffers or selected text ranges to maintain consistent readability. ([source](https://github.com/google/vim-codefmt#readme))
