Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Am I the only one who is incredibly annoyed by how Jetbrains IDEs indent code?! Really, the fact that they totally fail to indent even mildly broken code is infuriating. At least ten times a day I feel like yelling at webstorm "YES, I know that that code is broken, that there are two unpaired {s and one unpaired ', but I'll fix that F LATER! NOW I just want to type this code here and have it properly indented even if there's broken code 10 lines above it and 20 lines below it. I KNOW, and I DON'T care NOW!".

I just want to download stuff from my head to the editor before I forget it, then later fix the mess, and have the IDE/Editor still help me in the meantime. If it needs to temporarily revert to a caveman-style indent-like-the-previous-line or event to temporarily disable auto-indent, I'm ok with that, but don't horribly mess up what I type in failed attempts to semantically auto-indent broken code that I don't wanna fix right now...



No - you aren't the only one, this infuriates me sometimes. The worst is when you have a file that someone accidentally mixed indentations or something, or use 2 spaces instead of 4 (even 4 spaces seems to break for me) for continuation/promise stuff. I'll enter insert mode and it'll be in-explicably tabbed out 5-6 times further than it should and I have to exit insert mode and manually move over to the correct spot or finish typing the function in shit-mode then manually fix the indenting. There's been several times where I've given up in frustration and opened up VIM or sublime text because I don't want to deal with it anymore.


Parsing correct code is easy. Parsing broken code is really hard because they have no way to predict the mistakes people will make.


Just ignore it, and when you fix it, select the affected lines and use the auto-indentation feature. Why do you care how it ends up being indented before you fix it, if you are paying so much attention to the stuff you are trying to download from your head?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: