1 aggressive-indent-mode [![Say Thank You](https://img.shields.io/gratipay/Malabarba.svg)](https://gratipay.com/Malabarba/)
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
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`.
15 - An example of Lisp mode (Emacs Lisp):
16 ![Lisp Code Example](lisp-example.gif)
18 - An example of non-Lisp mode (C++):
19 ![Cpp Code Example](cpp-example.gif)
23 This package is available fom Melpa, you may install it by calling
25 M-x package-install RET aggressive-indent
29 (add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode)
30 (add-hook 'css-mode-hook #'aggressive-indent-mode)
32 You can use this hook on any mode you want, `aggressive-indent` is not
33 exclusive to emacs-lisp code. In fact, if you want to turn it on for
34 every programming mode, you can do something like:
36 (global-aggressive-indent-mode 1)
37 (add-to-list 'aggressive-indent-excluded-modes 'html-mode)
39 ### Manual Installation ###
41 If you don't want to install from Melpa, you can download it manually,
42 place it in your `load-path` along with its two dependencies:
44 - [Names](https://github.com/Bruce-Connor/names/)
45 - and `cl-lib` (which you should already have if your `emacs-version` is at least 24.3).
49 (require 'aggressive-indent)