C

Asked • 06/03/19

How can I autoformat/indent C code in vim?

When I copy code from another file, the formatting is messed up, like this: fun() { for(...) { for(...) { if(...) { } } } }How can I autoformat this code in vim?

1 Expert Answer

By:

Mulugeta E. answered • 06/10/19

Tutor
New to Wyzant

Over 4 years of tutoring at College level

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.