Indent several lines in Emacs

SoftTimur picture SoftTimur · Jul 30, 2012 · Viewed 18.5k times · Source

In my Emacs, space key can indent correctly 1 line. If I select several lines, and press space key, the indenting does not work.

By following this link, I try C-M-\ or C-M-q, but C-M deletes directly the whole block selected.

Here is my .emacs, could anyone help?

Answer

kev picture kev · Jul 30, 2012

Select multiply lines, then type C-u 8 C-x Tab, it will indent the region by 8 spaces.

C-u -4 C-x Tab will un-indent by 4 spaces