O'Reilly logo

Hacking Vim by Kim Schulz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Formatting Code

Formatting code often depends on many different things. Each programming language has its own syntax and some languages rely on formatting like indentation more than others. In some cases, the programmer is following style guidelines given by an employer so that code can follow the company-wide style.

So how should Vim know how you want your code formatted? The short answer is, it shouldn't! But by being flexible, Vim can let you set up exactly how you want your formatting done.

The fact is, however, that even though formatting differs, most styles of formatting follow the same basic rules. This means that in reality, you only have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required