News for hackers. Stuff that matters.
Re:Visual Studio Code 1.2 released by rejschaap on Tuesday June 07, 2016 @05:55AM (#11853415)
The automatically inserted whitespace always bothered me in VS Code. When writing code without an auto-formatter I always end up noticing the extra whitespace in the diff before committing and end up hunting it down. Automatically trimming the automatically inserted whitespace sounds like a somewhat complicated solution. It makes me wonder how other editors handle this, because I never had this problem with other editors.
Re:Visual Studio Code 1.2 released by vanderZwan on Tuesday June 07, 2016 @06:49AM (#11853579)
Could you expand on why you don't like to use an auto-formatter? I'm genuinely curious.

I'm pretty addicted to them; they add consistency without me having to think about it (killing off bike-shedding in the process), and in practice it works a bit like a visual semi-linter: if the auto-formatting doesn't produce the expected pattern (and your mind very quickly picks up the pattern subconsciously), it usually means there's a bug in the code somewhere around the area where it goes wrong.

Re:Visual Studio Code 1.2 released by rejschaap on Tuesday June 07, 2016 @10:05AM (#11854568)
I do like to use auto-formatters, but sometimes they are not available. For instance, until recently I didn't have anything for rust-lang. But rustfmt is pretty good now and VS code has good support for rust-lang through the RustyCode extension.
Re:Visual Studio Code 1.2 released by riskable on Tuesday June 07, 2016 @09:14AM (#11854215)
I use kate (KDE Advanced Text Editor) and there's a setting that removes trailing whitespace whenever you save a file. Works awesome.

You get auto-indent and at the same time don't have to worry about leftover whitespace everywhere when you 'git commit'. In fact, after accepting pull requests I'll often just open up the files in kate and doing a trivial edit + save to ensure there's no pointless whitespace.

Re:Visual Studio Code 1.2 released by brianpgordon on Tuesday June 07, 2016 @02:10PM (#11856395)
The IntelliJ family of editors will automatically put the caret at the right indent level wherever you are in the file, but leave the line empty of whitespace unless you actually type something on that line. That makes a lot more sense to me.
Re:Visual Studio Code 1.2 released by cbreeden on Tuesday June 07, 2016 @03:40PM (#11857170)
F1 then type trim. The first option to pop up should be the trim whitespace command. Hit enter. Or there is an option to trim automatically on save.
Re:Visual Studio Code 1.2 released by Gmo on Tuesday June 07, 2016 @10:34AM (#11854757)
They do have a setting to automatically remove whitespace "files.trimTrailingWhitespace": true

Or I don't understand what you are talking about ?