opensource.google.com

Menu

Format code the easy way with the codefmt plugins for Vim

Thursday, January 22, 2015


There are several wars in the world of programming that never die. Emacs vs Vim. Cuddled vs Non-Cuddled Braces. Tabs vs Spaces. Today we settle all of them… if you’re a Vim user. Google is pleased to release codefmt, a set of open-source plugins for automatically indenting your code in Vim. The default plugin provides support for C++, JavaScript, and Protocol Buffers via clang-format and for Go via gofmt. Additional languages are trivial to add by using codefmtlib to register them. Try it out and enjoy the freedom of never having to manually reflow your argument lists again.

by Matt Kulukundis, Search Infrastructure Team
.