]> code.delx.au - gnu-emacs-elpa/blob - README.md
Merge pull request #8 from tuhdo/master
[gnu-emacs-elpa] / README.md
1 aggressive-indent-mode
2 ======================
3
4 `electric-indent-mode` is enough to keep your code nicely aligned when
5 all you do is type. However, once you start shifting blocks around,
6 transposing lines, or slurping and barfing sexps, indentation is bound
7 to go wrong.
8
9 `aggressive-indent-mode` is a minor mode that keeps your code always
10 indented. It reindents after every command, making it more reliable
11 than `electric-indent-mode`.
12
13 ### Instructions ###
14
15 This package is available fom Melpa, you may install it by calling
16
17 M-x package-install RET aggressive-indent
18
19 Then activate it with
20
21 (add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode)
22 (add-hook 'css-mode-hook #'aggressive-indent-mode)
23
24 You can use this hook on any mode you want, `aggressive-indent` is not
25 exclusive to emacs-lisp code. In fact, if you want to turn it on for
26 every programming mode, you can do something like:
27
28 (global-aggressive-indent-mode 1)
29 (add-to-list 'aggressive-indent-excluded-modes 'html-mode)
30
31 DEMO:
32
33 ![aggressive-indent](aggressive-indent.gif)
34
35
36 ### Manual Installation ###
37
38 If you don't want to install from Melpa, you can download it manually,
39 place it in your `load-path` and require it with
40
41 (require 'aggressive-indent)