vim-autoformat is a universal “format this buffer” interface for Vim and Neovim that routes your file through the right external formatter with a single command. Instead of remembering dozens of tool names and CLI flags, you call one mapping and the plugin picks an appropriate backend based on filetype and configuration. It supports a wide range of formatters—such as Black, isort, yapf, Prettier, clang-format, gofmt, rustfmt, shfmt, and many more—while letting you override arguments per project or per filetype. Results flow back into the buffer, replacing content or selected regions, and can integrate with quickfix for error reporting when a tool fails. You can wire formatting to save events, cursor holds, or run it manually, keeping it as strict or as gentle as your workflow needs. For teams, a shared config ensures consistent code style across contributors regardless of their local editor knowledge.

Features

  • Single command to format current buffer or selection across many languages
  • Auto-detection of formatters by filetype with per-tool overrides
  • On-save formatting via autocmds or manual invocation when preferred
  • Pass custom CLI flags and profiles to external tools
  • Integrates with quickfix for surfacing formatter errors and warnings
  • Project-level and user-level configs to standardize code style

Project Samples

Project Activity

See All Activity >

Categories

Code Formatters

License

MIT License

Follow vim-autoformat

vim-autoformat Web Site

Other Useful Business Software
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of vim-autoformat!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Registered

2025-10-14