/clean-aindent

Emacs extension for clean auto-indent and backspace unindent

Primary LanguageEmacs LispOtherNOASSERTION

README

clean-aindent.el — Emacs extension for clean auto-indent and backspace unindent

Features

  • 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.

Installation

  1. Download clean-aindent.el

    $ wget https://github.com/pmarinov/clean-aindent/archive/master.zip
    $ unzip master.zip
  2. Copy clean-aindent.el to your ~/.emacs.d directory

    $ cp clean-aindent-master/clean-aindent.el ~/.emacs.d
  3. Add this to your init.el

    (require 'clean-aindent)

Configuration

To activate the simple indent mode, do one of the two:

  1. In your init.el

    (set 'clean-aindent_is-simple-indent t)
  2. Via M-x customize

Search for auto indent, toggle to on. Then Apply and Save.

License

clean-aindent was written by Petar Marinov

C0, public domain. See LICENSE.txt

Changelog

2014-05-27, v1.2.0, pmarinov

  • Changed: Move all function under the same namespace (function prefix)

2014-03-07, v1.1.0, pmarinov

  • Added: Simple auto indent mode. Configurable via M-x customize.

2013-08-31, v1.0.0, pmarinov

  • First implementation