notes from /dev/null

by Charles Choi 최민수


Binding the SPC key in Dired and IBuffer

24 Sep 2026  Charles Choi

A feature of macOS Finder that I enjoy using is Quick Look, where a preview of a selected file can be displayed by pressing the space bar. While “Quick Look” is not really a thing in Emacs (at least not out of the box), we can quasi-emulate this by taking advantage of commands that can open files in another Emacs window, all the while keeping the current Emacs window selected.

In Dired, I’ve bound SPC to the command dired-display-file.

1
(keymap-set dired-mode-map "SPC" #'dired-display-file)

A similar thing can be done for IBuffer:

1
(keymap-set ibuffer-mode-map "SPC" #'ibuffer-visit-buffer-other-window-noselect)

This configuration is definitely a personal preference thing, so YMMV. That said, I’ve found these bindings to be quite useful, so perhaps you may as well.

emacs

 

About • Mastodon • Bluesky • GitHub

Feeds & Tags •
Get Scrim for macOS • Get Captee for macOS

Powered by Pelican