clean-aindent.el — Emacs extension for clean auto-indent and backspace unindent
-
An auto-indent function (RET) that takes care to delete any unused white spaces
-
An unindent function (M-backspace) that aligns the cursor position to match indentation of best candidate from lines above
-
Simple auto-indent mode (activate via M-x customize) that disregards smart language based indentation and instead consistently aligns only based on indentation of the line above
For detailed documentation with screenshots please visit the emacswiki page.
-
Download clean-aindent.el
$ wget https://github.com/pmarinov/clean-aindent/archive/master.zip $ unzip master.zip
-
Copy clean-aindent.el to your ~/.emacs.d directory
$ cp clean-aindent-master/clean-aindent.el ~/.emacs.d
-
Add this to your init.el
(require 'clean-aindent)
To activate the simple indent mode, do one of the two:
-
In your init.el
(set 'clean-aindent_is-simple-indent t)
-
Via M-x customize
Search for auto indent, toggle to on. Then Apply and Save.
clean-aindent was written by Petar Marinov
C0, public domain. See LICENSE.txt