Essential Python feature


#1

Atom looks nice, so I wanted to share/request one of the essential features that would help me switch:
Intelligent Tab-key indenting, like Emacs does it.
The tab key in Emacs does not add 4 characters or a tab, it re-indents the line to its best-guess indentation level and subsequent tab-presses cycle through other valid levels. This happens regardless of where on the line the cursor is, so you never accidentally add 4 spaces somewhere.
Last time I looked no other editor could do this, so here’s your chance, Atom.


#2

Brackets does this, probably via a plugin.

Its an excellent candidate for a community driven plugin rather than a core plugin.


#3

I second this feature request. This is also for me an essential feature (also for the C/C++ mode, not only python).


#4

I just found the emacs-flow package:

This seems to do the trick upon first glance :smile:

Karsten


#5

Thanks! Let me know if there are bugs … I only had time to do a first pass so far :sunglasses:


#6

As far as I can tell, it doesn’t recognize that it should go back one indentation level (in python) after a “pass” or “return” or such. Let me know if you can confirm this…


#7

I can confirm that. Though I’m just relying on the built-in “auto-indent” feature and the grammar definitions, so I’m not sure that I’ll be able to fix this directly. We’ll probably need to have the grammar system enhanced to support scenarios like this.