Comment

Comment by tmm

This is the approach I took when I was teaching myself C in the late '90s. Indent with tabs, align with spaces intuitively made a lot of sense.

Then I started using code formatters, initially `indent', then vim plugins. Eventually, I found myself using Visual Studio professionally, and became content letting the IDE decide how code should be formatted. Now, I do whatever the language/community seems to prefer. For .NET stuff, Visual Studio defaults; Go and Rust have their own formatters, RubyMine defaults for Ruby, etc.

Everywhere I've worked whenever the code formatting debate comes up, "use the IDE/compiler/community standard" always wins the day. The hardest thing seems to be convincing Windows users that text files need to end with a newline. Is there a git option (like `autocrlf') for that?

parent tmm 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton