Skip to main content

New answers tagged

2 votes

C/C++ mode aggresive auto indent

For listing all active modes press [C-h m]. Ensure, that these modes are disabled: Aggressive-Indent (local and global); Electric-Indent (local and global). Turn off this modes and check Emacs ...
Dunaevsky Maxim's user avatar
1 vote

Indenting LaTeX code for \if \else \fi statements

It needs more tweaking than the code in the question as you can see in this commit. At any rate, this feature is available in AUCTeX OOTB and if you mark this example: \ifx\condition \dosomething \...
Arash Esbati's user avatar
  • 2,020
2 votes

How to change java file behaviour to use 2 character indentation

Check c-basic-offset, c-default-style, and c-style-alist. The default style for java is: ("java" (c-basic-offset . 4) (c-comment-only-line-offset 0 . 0) (c-offsets-alist (inline-open . 0) (...
Tianshu Wang's user avatar
  • 1,784
1 vote

How can I control the indentation inserted by Emacs because I used the tab key?

C-h f indent-tabs-mode tells you: Indentation can insert tabs if this is non-`nil`. So if you want TAB chars then leave the default value as t. Does indent-tabs-mode nil change tabs to spaces? No, ...
Drew's user avatar
  • 78k

Top 50 recent answers are included