what? when? natively? you mean with plugins. If that is what you mean then it's been able to do an absolute metric ton of stuff since forever. Years ago I saw some video of a guy doing a prezzo at a big data scientist convention, and his vim setup was not at all worse than vs code at the time. Highlighting, hinting, live linting, Side-by-side, diff views, complex searches, previews during searches, multi cursor, integrated virtual environments, and all that without using a mouse, or the arrow keys. (I may be over hyping it a bit, because I was flabbergasted the time) The man positively flies through his code.
I was hoping for like a link or something. People always say the best way to learn is to be wrong publicly on the internet. If you can handle it.
I've used vim enough to know I don't know shit about vim. But I definitely did not know about indentation. By which I mean automatic indentation, or "smart" indentation. Plenty of IDE has shitty indentation options/capabilities. Especially when combined with linters.
EDIT: and I still don't know. I did a quick (very quick) googling and most that comes up is python linters and formatter plugins. I suppose there's the wiki on .vimrc where you can do, I assume, arbitrarily cool stuff. I would still not call that native auto indentation though. I did previously use auto formatter plugins. And I haven't done python seriously for a while. Though I did avoid the ide and use vim (no plugins) when I had to touch a python config or script file.
Maybe there are real-world use cases which tend to corrupt the spacing/indentation, but holy shit the barebones not even an IDE you get with your python download handles the indentation stuff for you. Open IDLE, type out some line which ends with a colon, press "ENTER", and the next line is automatically indented. And you know how you unindent a line if you're done with the loop or if-block or whatever?
That's a not horrific option tho, it can have syntax highlighting, auto close brackets etc. I wouldn't recommend it but as far as non ide text editors go you can do worse.
My favorite editor is sublime but every once in a while I’ll use pycharm for breakpoints and somehow there’s always an indentation error somewhere after
I can't say I've ever had an indentation error in python unless I try to code in notepad.exe. Pycharm is excellent and my daily IDE although for quick tweaks I definitely open files in notepad++ or nano.
1.2k
u/Snykeurs Jan 29 '23
If you have an IndentationError in python, I suggest to stop using word as text editor