Skip to content
sudermanPublic

About

Jon's embarassing emacs config

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

486 Commits

Folders and files

Repository files navigation

suderman/emacs

About

This is the Emacs config I use every day. I tune it around how I edit, switch projects, and manage windows. It is not a starter kit. It has my paths, my keymap, and a few experiments that earned their place by solving something annoying.

Meow controls modal editing. meow-purrsist keeps selections adjustable by motion. Built-in project.el supplies project data. IBuffer lists open buffers by recency or by project, Dirvish handles the file tree and file management, and Magit handles Git. Vertico, Orderless, Consult, Marginalia, and Embark handle minibuffer completion. Corfu shows in-buffer completion, with Eglot supplying language-server results when the server is available.

Some choices are a little odd on purpose. Comma opens IBuffer, period opens Dirvish, and semicolon repeats edits. SPC is both Meow’s keypad and my leader key. IBuffer and Dirvish pass file and project context back and forth instead of acting like separate tools.

The editing map starts with selections, then applies changes to them. Dirvish cleans up Dired. Markdown preview runs Pandoc and refreshes after each save. Stylix supplies the colors, while Doom Modeline and Nerd Icons handle the lower status bar and file symbols. Image mode zooms by pinch, touchpad, or keys, swipes through a directory, and starts animated images automatically; G opens a thumbnail gallery.

Run it

nix run github:suderman/emacs

That runs the configuration bundled in the Nix store. To edit it live, clone it to ~/.config/emacs, or load a checkout with nix run . -- --init-directory "$PWD", then press F5 to reload after a change. Install covers the desktop package and the Android APK.

Common keys

SPC ? draws the current view’s keys on a keyboard, and Which-Key lists each leader group after SPC. These are the keys I use most.

Getting around

KeyAction
,IBuffer, starting on the previous buffer
.Dirvish for the current file
\Toggle the file sidebar
`Dashboard
< and >Previous and next buffer
SPC SPCM-x
SPC ?Keyboard cheatsheet for this view
C-c mMail
F5Reload the configuration

The dashboard opens on demand rather than at startup, and in a new emacsclient frame opened without a file. Its top row opens common source and configuration directories through Dirvish, followed by recent files, frequent files, and recent projects. Frequent files rank each visit by a score that halves every week, so files you return to stay listed across restarts. Backtick opens it from IBuffer and Dirvish too.

Editing in Normal state

Meow selects first, then acts. Movement extends an active selection.

KeyAction
hjklMove
w e bNext word start, word end, previous word
mSelect a word; repeat to grow to the enclosing thing
MSelect a line; repeat for a rectangle, then the buffer
zStep the selection back
i aInsert before or after
I AInsert at the line start or end
c vCopy and paste
xCut, then insert
d DDelete, or delete the line, without the kill ring
XCut whole lines and stay in Normal
u yUndo and redo
;Repeat the last edit
/ then n pSearch, then next and previous match
f tFind or move till a character
sSurround prefix
J KMove lines or an Org subtree
H LOutdent and indent, or promote and demote in Org
oFold or unfold the block on this line
[ ] { }Previous, next, parent, and child block
=Format the buffer
QKill the buffer

Windows

KeyAction
M-h/j/k/lFocus the window in that direction
M-H/J/K/LMove the divider
M-u M-iSplit below or right
M-wClose the window
M-zZoom the window
M-n M-NNew frame or tab

These work in every view, including IBuffer, Dirvish, and Magit. At the edge of Emacs they hand off to the surrounding terminal multiplexer.

Leader

KeyGroup
SPC ,Buffers
SPC .Files and bookmarks
SPC /Consult searches
SPC gGit, hunks, and conflicts
SPC oOrg states, planning, archive, and views
SPC tToggles
SPC wWindows
SPC qQuit, reload, pull, and upgrade
SPC TABFold the buffer, or open all but drawers

Documentation

GuideCovers
InstallNix package, Android APK, phone setup, and fonts
EditingMeow grammar, completion, search, bookmarks, and windows
Buffers and filesIBuffer, Dirvish, Image mode, transfers, and remote files
OrgTask states, Agenda, capture, refile, and archives
GitMagit, diff-hl, and conflicts
MailNotmuch, folder moves, sending, and Org-authored drafts
AndroidWhat runs on the phone, touch input, and Termux
AppearanceFonts, Stylix palettes, and light and dark themes
DevelopmentTinkering, tests, hot reload, Nix, and the repository map

The source wins when the docs fall behind.

About

Jon's embarassing emacs config

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages