Emacs Python indention

Andrea Crotti andrea.crotti.0 at gmail.com
Sun Jun 12 06:59:55 EDT 2011


Bastian Ballmann <balle at chaostal.de> writes:

> Hi Emacs / Python coders,
>
> moving a region of python code for more than one indention in Emacs is
> quite annoying, cause the python-shift-left and -right functions always
> loose the mark and one has to reactivate it with \C-x \C-x or
> guess how many indentions one want to make and do a \C-u <nr> \C-c >
>
> That were the only solutions I found on the net and well both are
> not very comfortable so here's a fix for that. With the following code
> you can use \C-c left and right to move your Python code to the left
> and to the right :)
> HF
>
> Basti

[...]


Nice functions...
But actually I use python-mode.el from the bzr trunk and the indentation
works really nicely, with C-c > or C-c <, and doesn't lose the mark.

Another nice thing is that often TAB does also the right thing,
indenting or unindenting if for example we add remove one level.



More information about the Python-list mailing list