Skip to content

Working with Projectsλ︎

Space p a to add a new project to Doom, selecting the directory path for the root of the project.

Space p p to switch to a project other than the current, list shows all other projects except current project.

A project is automatically assigned a workspace when opened. Space Tab r to rename the workspace

Space l l to list all current workspaces and select a different workspace.

Space ++back-tick++ to switch to previous buffer

Space Tab ++back-tick++ to switch to previous workspace

TODO: paste kill ring cycle - paste transient state in spacemacs

Discover projectsλ︎

Space p D to discover projects withing the directories specified in projectile-project-search-path

(setq projectile-project-search-path '(("~/projects" . 2) ("~/.config" . 1)))

Filesλ︎

Space u Space f f

Space f f to open or create a new file. If a file is open in the current buffer, its path is used as the starting point. To create a file (and intermediate directories), type any additional path and file name.

Space p f to list all files in the current project / workspace. Use this when you know the name of the project but not the path or to avoid navigating to the correct path.

Project Cache Outdated

Space p i to udate the project cache moving directories and files, otherwise Doom will open a buffer for the old location

Space u before a file command will also clear the cache and allow correct selection of files, e.g.

Space u Space f f

File diffsλ︎

Space f e runs ediff to compare 2 files, prompting to select each file in turn. j k to navigate the differences between each file. a to copy change from first file to second. b to copy change from second file to first.

Space f 3 runs ediff to compare 3 files.

Windowsλ︎

Space w and one of h j k l for vim-style navigation of windows

Space w v to create a new vertical window, Space w h for a new horizontal window

Sessionsλ︎

spc q s to save the current session, which should load when (re)starting Emacs

Searching across a projectλ︎

Space / to search across all files in a project, using ripgrep (if installed on OS execution path)

Ctrl+c+Ctrl+e opens search results in a separate buffer for editing results.

Ctrl+c+Ctrl+c or Z Z to commit changes

Narrow search results with Ripgrep switches

Use ripgrep switches before or after a search pattern, E.g. #-t clojure -- test or #test -- -t clojure.

rg --type-list for comprehensive list of types supported by Ripgrep. Types can represent one or more file extensions.

#test -- -t clojure only search for Clojure files (.clj, .cljc, .cljs, .cljx file extension )

#test -- -g*.tar.gz - search any file that matches a glob, i.e. file extension .tar.gz

#test#!cd - search for test and filter results containing cd using consult sub-search feature

Everything before the second # is filtered by ripgrep.

Everything after the second # is filtered by Vertico using Orderless 23, where ! (negatation), = (literal), ~ (fuzzy), % (case insensitive) prefixes are supported.

# delimiter can be replaced with any arbitrary character. E.g. %test%!cd or test!cd, useful when the search pattern starts with a # character