Suggestion: Cycle Indentation after Final Indentation Block

7 views
Skip to first unread message

Wes Kyle

unread,
Oct 13, 2015, 11:15:11 PM10/13/15
to Interactive Editor for Python
Hi all,

I've been trying to get away from Emacs and I really like IEP but one thing I suggest is that if TAB is pressed while the cursor is in the deepest indentation block, the cursor moves back to the first indentation block. Emacs does this and it definitely speeds up writing by saving me from backspacing all the time. Instead, I can just use TAB to cycle through the available blocks. It would be great to implement this in IEP.

Any thoughts on this?

Regards,

Wes

Almar Klein

unread,
Oct 14, 2015, 3:55:11 AM10/14/15
to ie...@googlegroups.com
If I understand correctly, if I have this (best viewed in monospace):

class Foo:
def bar(self):
a = 1
|

With my cursor being the bar below "a", if I now press Tab, I'd go back
to zero indentation instead of indenting that line? If it is, then there
would be no way to indent code more than syntactically makes sense,
which means that the IDE must be very aware of the maximum sensible
indentation of each line. And it can only work in Python.

I suppose it's possible, though I wonder if its not too "magical". What
if I like to indent my code first and then write a function def at the top?

- Almar
> --
> You received this message because you are subscribed to the Google
> Groups "Interactive Editor for Python" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to iep_+uns...@googlegroups.com
> <mailto:iep_+uns...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Eelke Spaak

unread,
Oct 14, 2015, 3:57:36 AM10/14/15
to ie...@googlegroups.com
And relatedly, what if you want to continue a statement on the next
line? The indentation on that second line depends a lot on personal
preference I think, some people want to have it start almost all the
way near the right margin, others will just want a single extra tab.

Eelke
> email to iep_+uns...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages