complete-computing-environment/code_formatting_aggressivel...

27 lines
1003 B
Org Mode

:PROPERTIES:
:ID: cce/code_formatting_aggressively
:END:
#+TITLE: Code Formatting, Aggressively
#+filetags: :Emacs:CCE:Coding:
#+PROPERTY: header-args :mkdirp yes :results none
#+PROPERTY: header-args:emacs-lisp :tangle aggressive-indent.el
#+ARCOLOGY_KEY: cce/aggressive-indent
#+ARCOLOGY_ALLOW_CRAWL: t
#+ARROYO_EMACS_MODULE: aggressive-indent
#+ARROYO_MODULE_WANTS: cce/basic_emacs_coding_config.org
#+ARROYO_MODULE_WANTS: cce/diminish.org
Emacs has a package which will dynamically re-align code whenever I make changes to the buffer. For languages that don't use whitespace for defining context (python, makefile, for example), this is optimal and it does a good job showing me when I've made syntax errors. Sometimes it's a bit too annoying, but alas.
#+begin_src emacs-lisp
(provide 'cce/aggressive-indent)
(use-package aggressive-indent
:diminish ""
:config
(add-to-list 'aggressive-indent-excluded-modes 'shell-mode)
(global-aggressive-indent-mode))
#+end_src