Skip to content

Doom Emacs

Sources:

Doom Emacs On Day One (Learn These Things FIRST)

Section titled “Doom Emacs On Day One (Learn These Things FIRST)”

Source: https://www.youtube.com/watch?v=37H7bD-G7nE

  • Emacs Daemon, Server

    • Can add start up on desktop startup:
      • Look for Start up applications
      • Add example /usr/bin/emacs –daemon
      • Restart session
    • Launch emacsclient -c -a ‘emacs’
    • Launching emacsclient easier:
      • In shell: alias emacs=emacsclient -c -a ‘emacs’
      • In desktop: add emacsclient.desktop
  • Open / find files

    • Can use vim way with :e <file> with tab completion
    • Use find-file or SPC .
    • Find recent files: SPC f r
  • Split screen:

    • Evil: split - C-w v, return to other split - C-w w
    • Doom: vertical split - SPC w v, close - SPC w c, other split - SPC w w
  • Kill buffer: SPC b k

  • Spelling and Languages support in Doom: init.el

  • Reload Doom configurations after init.el changes: doom-reload or SPC-h-r-r

  • Configurations in Doom: config.el

    • Add packages
  • Buffer management and switching

    • ibuffer: SPC-b-i
    • switch buffer: SPC-<
  • dired file manager

  • Terminals: recommend using - vterm or eshell

Terminal window
# Install Doom
cd ~/.config
git clone https://github.com/doomemacs/doomemacs.git emacs
cd ~/.config/emacs/bin/
doom install
# Start Emacs from Doom configuration
emacs
## or
emacs --init-directory ~/.config/emacs
### Other Commands
# Upgrade
doom upgrade
# Upgrade only your packages
doom upgrade --packages
# Build after Emacs version upgrades
doom build
# Check health of Doom and dependencies
doom doctor

When receiving an error like the following on Windows operating system, the error is likely due to carriage return (CR) characters on Windows.

EditorConfig: (editorconfig-error "Error from editorconfig-get-properties-function: (error \"Error while reading config file: ~/.config/emacs/modules/editor/file-templates/templates/.editorconfig:1:
[*]
\")")

Open the file that is part of Doom Emacs at ~/.config/emacs/modules/editor/file-templates/templates/.editorconfig and remove the CR characters. Save the file and restart Doom Emacs. The editorconfig-get-properties-function function should now run fine on Windows with the CR characters removed.