Doom Emacs Cheat Sheet



# Why the Switch?

  1. Emacs Commands Cheat Sheet
  2. Doom Emacs Cheat Sheet
  • Open file links in emacs: C-u C-c C-o force open in emacs/other window: mouse-1/2: open link at point: mouse-3 force open in emacs/other window: C-c% record a position in mark ring: C-c & jump back to last followed link(s) C-c C-x C-n: find next link: C-c C-x C-p: find previous link: C-c ' edit code snippet of file at point: C-c C-x C-v.
  • The Ultimate Doom Emacs Cheatsheet Command Abbreviations. C - “Control” key; M - “M” or “option/alt” key; s - “Command” key; SPC - “Space” key; General. SPC f s for saving the current file; SPC: for entering a command SPC q q to close Emacs; SPC f D to delete this file; Projects with Projectile. SPC p p to open a project; SPC SPC to open a file in a project; SPC o p to.
  • This is also available in emacs itself by typing 'C-h F' (note that the 'F' must be capitalized). The Web version is hypertext, though it isn't very easy to navigate, and it does have a reference page that points to all kinds of good stuff.

I love the way that Spacemacs looks and its easilyextensible config supports most everything that I need, but it has always feltslow to me. Sacrificing function for form is not something that I usually do;especially in regard to text editing. I've dealt with the slowness for some timenow; while it is annoying, the UX that Spacemacs provides is far superior tovanilla Emacs and I don't have the desire to recreate it with a hand-rolledconfig of my own.

What is Spacemacs?

Completely new to Doom emacs and Vim mode do you have a good cheat sheet for commonly used commands? Really new, I knew my way with emacs but with evil mode I didn't even know how to erase a character haha.

Spacemacs is a new way to experience Emacs -- a sophisticated and polishedset-up focused on ergonomics, mnemonics and consistency.

Just clone it, launch it, then press the space bar to explore the interactivelist of carefully-chosen key bindings. You can also press the home buffer's [?]button for some great first key bindings to try.

Spacemacs can be used naturally by both Emacs and Vim users -- you can even mixthe two editing styles. Switching easily between input styles makes Spacemacs agreat tool for pair-programming.

Spacemacs is currently in beta, and contributions are very welcome.

I'm not a Vim user. I know just enoughvi to get by on the command linewhen SSH'ing into a machine without Emacs installed. As such, I've always usedSpacemacs 'on the planet Emacs in the Holy controltower'and never sailed 'among the stars aboard the Evil flagship'.

Spacemacs contends, 'The best editor is neither Emacs nor Vim, it's Emacs andVim!'.

What is Doom Emacs?

It is a story as old as time. A stubborn, shell-dwelling, and melodramaticvimmer -- envious of the features of modern text editors -- spirals into despairbefore succumbing to the dark side. Thisis his config.

Doom is a configuration framework for GNUEmacs tailored for Emacs bankruptcyveterans who want less framework in their frameworks and the performance of ahand rolled config (or better). It can be a foundation for your own config or aresource for Emacs enthusiasts to learn more about our favorite OS.

Much like Spacemacs, Doom Emacs defaults to using the extensible vi layer(EVIL) mode. It certainly seems like mostpeople prefer the vi key bindings, but still want that one-stop-shop experiencethat Emacs provides so well.

Doom Emacs has a similar interface to Spacemacs, but based on my limited usagethus far; seems much more polished. For one, it starts up in under 2 seconds onmy work MacBook Pro. You may be yelling in your chair right now: 'You don't runEmacs over and over! You use the client/server! Who cares if it takes time tostart when you're only going to start it once?'

I do use the client / server, but I'm not so lucky to have an always-onworkstation at work. It's also more responsive in general when browsing forfiles or performing searches.

alias ec='emacsclient -n -a emacs'

# Install Dependencies

# Install Emacs

# Install Doom

# Activate WSL and Install Ubuntu 18.04 LTS

  1. In Powershell as admin (Windows key + x) run:
  1. Restart
  2. Download and install Ubuntu 18.04 LTS from the Microsoft Store
  3. Launch Ubuntu 18.04 LTS
  4. Update and upgrade Ubuntu

# Install Doom Emacs

  1. Install Emacs 26
  1. Install Doom Emacs
  1. Run Doom Doctor

# Install a Windows X Server

# Create an Alias to Launch Emacs

In order to run Emacs: open Ubuntu 18.04 LTS in Windows and run emax in theterminal. The terminal will exit and Doom should launch in an X window.

The local Windows filesystem is available under /mnt.

Run with the usual emacs -nw Ms paint for mac. for no X window.

# Configuring Doom

Inside ~/.doom.d/:

Linux emacs cheat sheet
  • config.el

Place your private configuration here! Remember, you do not need to run doom refresh after modifying this file!

  • init.el

This file controls what Doom modules are enabled and what order they load in.Remember to run doom sync after modifying it!

  • packages.el

This is where you install packages, by declaring them with the package! macro,then running doom refresh on the command line. You'll need to restart Emacsfor your changes to take effect! Or at least, run M-x doom/reload.

You'll find the doom binary in the ~/.emacs.d/bin directory:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

doom-themes

DOOM Themes is an opinionated UI plugin and pack of themes extracted from myemacs.d, inspired by some of my favorite color themes.

# Doom Laserwave

Sheet

# Workflows

# Splitting Windows

Emacs Commands Cheat Sheet

I use this a lot. I wish every application supported splitting the window likeEmacs (If anyone knows a web browser that supports this I'd like to know - I do know about and use TWMs when I can).

C-x 2 [split-window-below] - Splits the window horizontally.

C-x 3 [split-window-right] - Splits the window vertically. Editing apps for mac.

Doom Emacs Cheat Sheet

# Un-splitting Windows

C-x 0 [+workspace/close-window-or-workspace] - Close the selected window. Ifit's the last window in the workspace, either close the workspace (as well asits associated frame, if one exists) and move to the next.

Doom Emacs Cheat Sheet

C-x 1 [delete-other-windows] - Make the selected window fill its frame.

# Jumping Between Windows

Doom suprised me with this one. The keybinding is the same as the Emacs default,but it uses ace-window instead of other-window. It's great though. Justfollow up with the highlighted character in the top left of the buffer to switchto that window.

C-x o [ace-window] - Select a window.

# Search For Other Occurrences in Buffer

C-s C-w [isearch-forward] - Do incremental search forward

(keep holding Ctrl and pressing w until all words you intend to search for havebeen selected and then go back to pressing s to search).

Doom Emacs Cheat Sheet

C-c s S [swiper-isearch-thing-at-point] - Insert symbol-at-point into theminibuffer of swiper-isearch.

# Search Project

Emacs cheat sheet wallpaper

C-c s p [+default/search-project] - Conduct a text search in the currentproject root

I'd also like to be able to search the entire project for the word at point,but I'm not sure if Doom supports this out of the box.

# Open Project File Explorer

C-c o p [+treemacs/toggle] - Initialize or toggle treemacs.

# Open a Terminal

C-c o t [+term/toggle] - Toggle a persistent terminal popup window.

# Text Manipulation

M-q [fill-paragraph] - Fill paragraph at or after point.

Introduces line breaks into text to keep columns as close to 80 characters aspossible.

# Help

C-h k [helpful-key] - Show help for interactive command bound toKEY-SEQUENCE.

C-h v [counsel-describe-variable] - Display the full documentation of VARIABLE (a symbol).

C-h f [counsel-describe-function] - Display the full documentation of FUNCTION (a symbol).