org-autolist makes org-mode lists behave more like lists in non-programming editors such as Google Docs, MS Word, and OS X Notes.
When editing a list item, pressing "Return" will insert a new list item automatically. This works for both bullet points and checkboxes, so there's no need to think about whether to use M-<return>
or M-S-<return>
. Similarly, pressing "Backspace" at the beginning of a list item deletes the bullet / checkbox, and moves the cursor to the end of the previous line.
The recommended way to install org-autolist via package.el
.
The latest stable version can be found in the MELPA Stable repository.
If you'd like the latest, potentially unstable version, you can also install org-autolist from the normal MELPA repository.
Installing via use-package is easy:
(use-package org-autolist
:hook (org-mode . org-autolist-mode))
To enable org-autolist mode in the current buffer:
(org-autolist-mode)
To enable it whenever you open an org file, add this to your init.el
:
(add-hook 'org-mode-hook (lambda () (org-autolist-mode)))
The easiest way to illustrate org-autolist's functionality is with a few examples. Here, we'll use the |
character to indicate the cursor position.
Suppose we start with this list:
- one
- two
- apple|
Pressing "Return" once will result in the following:
- one
- two
- apple
- |
Pressing "Return" again will result in:
- one
- two
- apple
- |
And pressing "Return" a final time will result in:
- one
- two
- apple
|
Now, suppose we start with:
- [ ] one
- [ ] two
- [ ] apple
- [ ] |
Pressing "Backspace" will produce:
- [ ] one
- [ ] two
- [ ] apple|
Similarly, if we instead start from here:
- [ ] one
- [ ] two
- [ ] |apple
Then pressing "Backspace" will produce:
- [ ] one
- [ ] two|apple
If you want to disable this behavior, add this to your init.el
:
(setq org-autolist-enable-delete nil)
If you find a bug, or have a suggestion for an improvement, then feel free to submit an issue or pull request!