4 ms·
I actually wish more editors had emacs style indenting where hitting tab anywhere on the line would re-indent it or otherwise cycle through indent levels if it
by ljm 2y ago
I actually wish more editors had emacs style indenting where hitting tab anywhere on the line would re-indent it or otherwise cycle through indent levels if it was unclear, especially because you’re unlikely to get copilot suggestions in the middle of a word. Plus, it doesn’t break if there’s a syntax error elsewhere in the file.
- fhd2 2y agoIt's one of those weird Emacs things that you get _so_ used to that everything else seems to waste your time. Using code formatters and formatting on save or with a shortcut is OK, but not really the same to me. That's probably why I'm stuck with Emacs: 1. No need to use the mouse. 2. Extremely efficient keyboard usage (maybe not the most efficient, but compared with common IDEs, certainly). Makes it feel like I'm actually using a brain computer interface. The somewhat regular yak shaving is a bit of a bummer though. I like that I can modify everything to be exactly how I like it, but I wouldn't mind sensible defaults. Haven't found a distribution yet that works well without tinkering.
- ljm 2y agoExactly, and sometimes I don't want to save a file just for indentation to happen as a side-effect, especially if I can do `C-x H TAB` to correctly re-indent the entire thing. That's particularly more helpful when some formatters will actually rewrite your code to either break lines up or squish things back into a one-liner.
- boxed 2y agoOh, didn't know about that. That makes a lot of sense. Reminds me of how hitting cmd+c on a line in PyCharm copies the entire line if there is no selection. Because what else would make sense?
- yencabulator 2y agoI thought that was a great feature. Now I'm writing mostly languages with well-defined formatting rules and simply never need tab. This is even better.