Overview
Emacs is a text editor that is often hailed for its ability to be customized. People use it for their agenda, RSS feeds, code editing, and more. By extending the base packages, vim keybindings can be used, LSPs can be configured, etc.
Terms
- Projects - Just a folder.
- Layers - Specific to Spacemacs: A set of toggleable configurations to bring packages together.
- Modes - There are major and minor modes. Simply changes how text input affects the buffer.
- Packages - Extending the base functionality of Emacs.
Highlights
Org Mode
There’s a rabbit hole called org-mode which I encourage you to at least consider. It’s useful for keeping an agenda, creating todos, knowledge management, documentation, etc.
GDQuest has a solid intro video here. A good follow-up is this video about tagging with org-mode.
Frequently recommended org extensions:
Magit
In Neovim, my favorite git UI is lazygit. Unfortunately it’s not that popular. In Emacs, my favorite git UI is the git UI for Emacs. It has everything. You could even start a Pull Request with a few key taps.
I haven’t tried it yet, but people also swear by Magit for resolving merge conflicts.
Emacs Pre-Built Distributions
Doom Emacs
My Doom Emacs config lives at https://github.com/ZaneH/doom-emacs-config
Doom Emacs Keybinds
As you press keys, watch the menu that appears at the bottom of the screen to find more useful keybinds.
Keybind | Description | Custom |
---|---|---|
C-w C-w | Window selection | |
SPC p p | Select project | |
SPC o t | Toggle terminal | |
g s SPC | Jump to text | |
SPC g g | Open Magit (git) | |
SPC n r f | Find a roam note | |
SPC n r i | Insert roam note here | |
SPC n j j | New journal entry | |
M-d | Highlight next occurrence | |
SPC r i | Multi-cursor edit highlighted | Yes |
SPC p i | Refresh file cache |
Spacemacs
The first time I used Emacs was with Spacemacs. In my experience, Spacemacs is slow.
Spacemacs Keybinds
As you press keys, watch the menu that appears at the bottom of the screen to find more useful keybinds.
Keybind | Description |
---|---|
SPC ? | Opens all keybindings |
SPC SPC | Opens Emacs command menu |
, | Opens the major chord menu |
SPC f s | Save file |
SPC f t | Open file tree |
SPC f e d | Open Emacs dotfile |
SPC f e R | Reload Emacs config |
SPC p f | Find file in project (fuzzy) |
SPC j = | Auto-format code |
SPC j j | Jump anywhere |
SPC w 2 | Split into a 2 window layout |
SPC w TAB | Navigate to next window |
SPC b b | List all buffers |
SPC b x | Close current buffer and window |
SPC T s | Switch themes |
SPC s s | Search file |
SPC q q | Kill Emacs |
C-c C-p a | Add project to workspace |
C-c C-p d | Drop project from workspace |
SPC / | Search project (live grep) |
SPC g s | Open Magit (git) panel |
C-n | Select next occurance |
C-h i | Opens the Emacs instruction manual |
As you combine these with vim/Emacs keybinds, everything just becomes more efficient.