Skip to content

calvinwyoung/org-autolist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

Summary

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.

Installation

The recommended way to install org-autolist via package.el.

MELPA Stable

The latest stable version can be found in the MELPA Stable repository.

MELPA

If you'd like the latest, potentially unstable version, you can also install org-autolist from the normal MELPA repository.

use-package

Installing via use-package is easy:

(use-package org-autolist
  :hook (org-mode . org-autolist-mode))

Usage

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)))

Examples

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.

Inserting list items

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
|

Deleting list items

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)

Feedback

If you find a bug, or have a suggestion for an improvement, then feel free to submit an issue or pull request!

About

Making it even easier to edit lists in org-mode!

Resources

License

Stars

Watchers

Forks

Packages

No packages published