Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to outdent a block with emacs?

Tags:

emacs

I can use C-x TAB for indenting 1 column, or C-u N C-x TAB for N columns.

How can I `outdent' a block with emacs?

like image 217
prosseek Avatar asked Aug 24 '10 14:08

prosseek


4 Answers

You do the same, since C-x tab understands negative arguments.

So to outdent 3 columns:

C-u - 3 C-x TAB

like image 59
Bahbar Avatar answered Oct 21 '22 21:10

Bahbar


In python mode, for a marked region you also use C-c-< to outdent and C-c-> to indent

like image 22
oarsome Avatar answered Oct 21 '22 20:10

oarsome


Use rectangular operations. C-x r k - to kill a rectangle.

like image 3
Maxim Egorushkin Avatar answered Oct 21 '22 19:10

Maxim Egorushkin


Just like you mention for indenting:

C-u N C-x TAB

Just use a negative N:

C-u -N C-x TAB

like image 3
Josh Avatar answered Oct 21 '22 20:10

Josh