Let’s Get Cuddly! (or not, I’m not judging)

Categories Programming

As a personal preference, I’m a fan of cuddly braces. It’s the way I learned, but I feel like it leads to more concise and readable code in most cases. I could go on, but as a topic it’s been beaten to death, and there are arguments with merit on both sides.

That being said, at work we use newline braces, and I don’t like it. A good programmer follows the in-place coding style, so that’s what I’ve been doing. It doesn’t mean I have to like it, though. While I use a separate installation of Visual Studio on an entirely different computer for coding my personal projects, there are times where I’d like to not have to completely switch machines to bang out some lines of code.

After reading that you can export and import Visual Studio settings, I created two settings files trimmed down to only include indentation and newline settings, so now I can simply import a settings file and all the rules I want changed are changed.

Feel free to edit the below files to your needs:

VS_Personal.vssettings (3.6k) – Cuddly style
VS_Work.vssettings (3.6k) – Non-cuddly style (braces on newlines)

These are only for Visual Studio, though. I’ve got nothing to offer for other editors, but feel free to contribute settings files for any other IDE.

Comments

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>