Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>How are you indenting, and in which mode?</p> <p>The indentation rules in any programming mode should generally just get it right. (If they don't, that's probably more indicative that you want to configure the rules for that mode differently, but I suspect that's a different question which has been asked already).</p> <p>If you're in text-mode or similar and just using TAB, then I can see the problem.</p> <p>Note that if you're using <code>indent-rigidly</code> (<code>C-x C-i</code>, or <code>C-x TAB</code> which is the same thing) then you <em>can</em> repeatedly indent the same region simply by repeating the command, even if the highlighting has disappeared from view.</p> <p>You can also use a prefix arg to <code>indent-rigidly</code> to make it indent many times. e.g. <code>C-u C-u C-x C-i</code> (easier to type than it looks) will indent 16 spaces (4 x 4, as the prefix arg defaults to 4, and it multiplies on each repeat). Similarly, <code>M-8 C-x C-i</code> indents 8 spaces. This is fine in some circumstances, and way too cumbersome in others.</p> <p>Personally I suggest putting <code>(cua-selection-mode 1)</code> into your .emacs and using that for rigid indentation. <a href="http://trey-jackson.blogspot.com/2008/10/emacs-tip-26-cua-mode-specifically.html" rel="nofollow noreferrer">Trey Jackson made a handy blog about it</a>. With this, you can <code>C-RET</code> to start rectangle selection, <code>down</code> as many lines as you need, <code>TAB</code> repeatedly to indent the lines, and <code>C-RET</code> to exit the mode.</p> <p>While the rectangle is active, <code>RET</code> cycles through the corners. For left-hand corners, typing inserts in front. For right-hand corners, typing inserts after. For the single-column rectangle, bottom counts as 'left' and top counts as 'right' for this purpose.</p> <p>Trey's blog lists all the available features (or look in the source file: cua-base.el)</p> <p>Be warned that indentation in Emacs is generally <a href="https://stackoverflow.com/questions/2885411/why-might-my-emacs-use-spaces-instead-of-tabs">an unexpectedly complicated topic</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload