emacs tip: selected-mode

Table of Contents

Emacs tips and tricks

Shared on the Emacs Tips, Tricks, &c. thread1

Use selected mode to set up a keymap that only applies when you have a selection. I use this every day. It’s great for indentation of an area, and I also use it for removing duplicate lines, doing replacements in region, and an org-specific one for creating a numbered list of the selection.

https://github.com/Kungsgeten/selected.el

Footnotes

1 This post is at https://www.reddit.com/r/emacs/comments/15yxdz3/comment/jy393ro/?utm_source=share&utm_medium=web2x&context=3 , but there are archives of each of the previous week’s tips threads that are valuable to read. You can find all the iterations for your browsing pleasure at https://www.reddit.com/r/emacs/search?q=Weekly%20tips&restrict_sr=on&sort=new&t=all.

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist