2

Is it possible to setup emacs to indent C code, with tabs for blocks { ... } and spaces with other wrapping (argument, for example)?

Eg:

<-->if (foo) {
<--><-->function(a, b,
<--><-->.........c, d);
<-->}

Currently emacs uses tabs with spaces for padding.

<-->if (foo) {
<--><-->function(a, b,
<--><--><--><-->.c, d);
<-->}

(where <--> is for tabs and . for spaces).

QtCreator has the option to: Align continuation lines --> with spaces.

Is this possible in emacs?


Update, I wasn't aware at time of asking but this is sometimes called "smart-tabs".

ideasman42
  • 8,375
  • 1
  • 28
  • 105
  • 1
    This is more commonly known as "Smart Tabs", there's at least one Emacs package out there for it. – wasamasa Mar 11 '17 at 10:13

0 Answers0