Skip to content

Migrate from Spacemacs to Doom Emacsλ︎

The major differences between Spacemacs and Doom Emacs

  • Key bindings
  • Completion framework (vertico rather than helm)
  • Spacemacs added touches (Doom has a minimal approach)

Key bindingsλ︎

practicalli/doom-emacs-config

practicalli/doom-emacs-config changes many Doom Emacs key bindings to Spacemacs bindings to easy usability of Doom Emacs. The more familiar the key binding experience, the simpler it is to adopt Doom Emacs.

Not all key bindings have been changed and some of the Doom Emacs defaults are adopted (either because they feel easy to adopt or it is not clear how to change them effectively)

Doom Vim-style bindingsλ︎

Doom key bindings tend to follow vim-style movement for the basic operation of Emacs

Space : for M-x to show a list of alll Emacs commands

Space w s / v to split a window horizontally / vertical split

Space w h / j / k / l to move cursor to window left, down, up right (with captial versions moving the window rather than cursor)

Major changesλ︎

The +bindings.el configuration file makes changes to the general use of Doom Emacs

, is mapped as the local leader, Space remains the leader key (common to both Doom and Spacemacs)

Space Tab bound to toggle to last buffer

Space l replaces Space Tab as the workspace menu, Space l Tab added to toggle to last workspace

Space b h added to jump to home buffer

Space Space used as Meta+x although the default Space : Doom Emacs binding is kept

File diffλ︎

SPC D is the Spacemacs diff menu

Doom has no menu for diff that I can find, although there are a few Emacs key bindings

SPC d menu provides key bindings for diff, ediff, ediff3, vc-root-diff and vc-diff. Menu included in practicalli/doom-emacs-config

Magit Statusλ︎

Space g s remaped to Magit Status buffer, although Doom default binding Space g s is kept

Doom bindings that are different to Spacemacs and have not been changed in practicalli/doom-emacs-config

ZZ to close and commit message and create a commit (Spaceamcs ,,)

ZQ to cancel the commit message (Spaceamcs ,k)

Spacemacs added touchesλ︎

Things added in Spacemacs not available (or not the same) in Doom Emacs

Visual selectλ︎

Spacemacs:

SPC v to select and additional v to grow selection, V to shrink selection

Doom: Use o to toggle between ends of selection and grow using vim motions

TODO: discover other options and identify if there is a similar approach to Spacemacs SPC v

Pasteλ︎

Spacemacs:

p shows the paste transient state menu, allowing for cycling the kill ring and pasting different values

Doom: p M-y will paste the current value and use yank-pop to cycle through the kill ring

SPC i y inserts a value from the kill ring, showing a popup list of the history

Whitespace clean upλ︎

Spacemacs can be configured to automattically remove extra whitespace when saving a file.

Doom: Space c w key binding removes extra whitespace

TODO: automate whitespace removal on file save