{"id":13609735,"url":"https://github.com/Malabarba/aggressive-indent-mode","last_synced_at":"2025-04-12T20:32:20.233Z","repository":{"id":21949547,"uuid":"25274069","full_name":"Malabarba/aggressive-indent-mode","owner":"Malabarba","description":"Emacs minor mode that keeps your code always indented. More reliable than electric-indent-mode.","archived":false,"fork":false,"pushed_at":"2024-07-07T11:22:45.000Z","size":788,"stargazers_count":859,"open_issues_count":37,"forks_count":35,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-02-20T10:41:31.103Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Malabarba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-15T21:19:43.000Z","updated_at":"2025-02-07T14:30:48.000Z","dependencies_parsed_at":"2024-11-07T15:38:16.153Z","dependency_job_id":"014d0f25-e2c8-4763-aea1-5a91e141eaf3","html_url":"https://github.com/Malabarba/aggressive-indent-mode","commit_stats":{"total_commits":186,"total_committers":29,"mean_commits":6.413793103448276,"dds":"0.27956989247311825","last_synced_commit":"a437a45868f94b77362c6b913c5ee8e67b273c42"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malabarba%2Faggressive-indent-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malabarba%2Faggressive-indent-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malabarba%2Faggressive-indent-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malabarba%2Faggressive-indent-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malabarba","download_url":"https://codeload.github.com/Malabarba/aggressive-indent-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248629966,"owners_count":21136352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:37.549Z","updated_at":"2025-04-12T20:32:18.388Z","avatar_url":"https://github.com/Malabarba.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp","Editor Plugins"],"sub_categories":[],"readme":"aggressive-indent-mode [![Melpa](http://melpa.org/packages/aggressive-indent-badge.svg)](http://melpa.org/#/aggressive-indent) [![Melpa-Stable](http://stable.melpa.org/packages/aggressive-indent-badge.svg)](http://stable.melpa.org/#/aggressive-indent)\n======================\n\n`electric-indent-mode` is enough to keep your code nicely aligned when\nall you do is type. However, once you start shifting blocks around,\ntransposing lines, or slurping and barfing sexps, indentation is bound\nto go wrong.\n\n**`aggressive-indent-mode`** is a minor mode that keeps your code **always**\nindented. It reindents after every change, making it more reliable\nthan `electric-indent-mode`.\n\n### Demonstration ###\n\n- An example of Lisp mode (Emacs Lisp):\n![Lisp Code Example](lisp-example.gif)\n\n- An example of non-Lisp mode (C):\n![C Code Example](c-example.gif)\n\n### Instructions ###\n\nThis package is available from Melpa, you may install it by calling\n\n    M-x package-install RET aggressive-indent\n\nThen activate it with\n\n    (add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode)\n    (add-hook 'css-mode-hook #'aggressive-indent-mode)\n\nYou can use this hook on any mode you want, `aggressive-indent` is not\nexclusive to emacs-lisp code. In fact, if you want to turn it on for\nevery programming mode, you can do something like:\n\n    (global-aggressive-indent-mode 1)\n    (add-to-list 'aggressive-indent-excluded-modes 'html-mode)\n\n#### Manual Installation ####\n\nIf you don't want to install from Melpa, you can download it manually,\nplace it in your `load-path` along with its dependency `cl-lib` (which\nyou should already have if your `emacs-version` is at least 24.3).\n\nThen require it with:\n\n    (require 'aggressive-indent)\n\n### Customization ###\n\nThe variable `aggressive-indent-dont-indent-if` lets you customize\nwhen you **don't** want indentation to happen.\nFor instance, if you think it's annoying that lines jump around in\n`c++-mode` because you haven't typed the `;` yet, you could add the\nfollowing clause:\n\n    (add-to-list\n     'aggressive-indent-dont-indent-if\n     '(and (derived-mode-p 'c++-mode)\n           (null (string-match \"\\\\([;{}]\\\\|\\\\b\\\\(if\\\\|for\\\\|while\\\\)\\\\b\\\\)\"\n                               (thing-at-point 'line)))))\n\n## Contribute ##\n\n[![Gratipay](https://cdn.rawgit.com/gratipay/gratipay-badge/2.1.3/dist/gratipay.png)](https://gratipay.com/Malabarba) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMalabarba%2Faggressive-indent-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMalabarba%2Faggressive-indent-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMalabarba%2Faggressive-indent-mode/lists"}