In a lot of text editors there is a keystroke used to move the selected lines one "tab" to the right, usually 4 whitespace or one "tab" to the left. How can I do this in emacs? I have only found automatic indentation like C-M-|

  • While this is indeed useful sometimes, an experienced Emacs user would rarely need this. Can you share the reason for needing this functionality? It might be the case that the original problem can be solved differently, but in a more efficient / smart way.
    – wvxvw
    Dec 15, 2016 at 10:30

1 Answer 1


There's some commands starting with the name indent-rigidly, which indents by whitespace. The base command indent-rigidly is bound to C-x TAB by default, and lets you use the arrow keys to indent the region (left/right to indent one space, shift + left/right to indent by tab stops).

Instead of indent-rigidly you might want to use indent-rigidly-left-to-tab-stop or indent-rigidly-right-to-tab-stop, but they have no default key bindings.

Not the answer you're looking for? Browse other questions tagged or ask your own question.