Skip to content

Instantly share code, notes, and snippets.

@lambda-mike
Last active May 26, 2021 12:07
Show Gist options
  • Save lambda-mike/272a1457bb7cfb26fc2973e82b4e1472 to your computer and use it in GitHub Desktop.
Save lambda-mike/272a1457bb7cfb26fc2973e82b4e1472 to your computer and use it in GitHub Desktop.

Doom Emacs

Top

  • SPC q q quit
  • SPC SPC find file in project
  • SPC . find file (slower)
  • SPC , open a workspace buffer
  • SPC f p edit private config files
  • SPC f r recently visited files
  • SPC s p fuzzy search project (rg)
  • SPC b B to open any buffer
  • SPC : <M-x> (execute command)
  • SPC x pop up scratch buffer
  • SPC t b toggle big font mode
  • gcc comment current line (gc movement)
  • SPC ` SPC b l switch to last buffer
  • SPC TAB ` switch to last workspace
  • SPC h t load theme (doom-one is default)
  • SPC i r insert from evil register using fuzzy counsel menu
  • SPC s j search jump list

Help

  • SPC h f describe function (example: evil-window-vsplit)
  • SPC h . display local help (describe thing under cursor)
  • SPC h t load theme (doom-one is default)

Editing

  • select text in Visual mode, hit S and char to wrap selection in, ie. (
  • g= increment number under cursor
  • g- decrement number under cursor
  • gQ fill paragraph by truncating lines to certain length and adding new line char
  • gw fill up to following move (type it)

Projects

  • SPC p p to open a project
  • SPC SPC to open a file in a project
  • SPC o p open project sidebar
  • SPC o e to open the shell in a popup window
  • SPC o E to open the shell in current buffer
  • SPC f r recently visited files
  • SPC f R recently visited files in a project

M-x projectile-discover-projects-in-directory to find projects within given folder using Projectile

M-x projectile-discover-projects-in-search-path to find projects in the folder defined by the projectile-project-search-path variable using Projectile

Workspaces

  • SPC TAB . switch workspace
  • SPC TAB ` switch to last workspace
  • SPC TAB l load workspace
  • SPC TAB n new workspace
  • SPC TAB r rename workspace
  • SPC TAB s save workspace
  • M-1..9 open workspace 1-9

Buffers

  • SPC b b open a workspace buffer (the same as SPC ,)
  • SPC b B open any buffer
  • SPC b k kill buffer
  • SPC b N new buffer
  • SPC b s save buffer
  • SPC b u save buffer as root
  • SPC x pop up scratch buffer
  • SPC ` switch to last buffer (SPC b l)

Files

  • SPC f l locate file (no folders!!)
  • SPC f F find files from here (and folders) (like fzf)
  • SPC f p edit private config files
  • SPC f r recently visited files
  • SPC SPC find file in project
  • SPC . find file (slower)

Search

  • SPC s s search buffer
  • SPC s p fuzzy search project (rg)
  • SPC s d search dir
  • SPC s ' resume last search

Windows

  • SPC w v split window vertically
  • SPC w s split window horizontally
  • SPC w j|k|h|l move to window
  • SPC w w move to next window
  • SPC w W move to prev window
  • SPC w c close window
  • SPC w o zoom/only window (other windows remain squeezed)

Code

  • SPC c - code submenu

DirEd

  • ( toggle display mode
  • - go up in dir hierarchy
  • + create dir
  • SPC . finds file, but can also create empty file
  • d mark for deletion
  • x execute (delete files)
  • o sort by name/date
  • M modify mod (permissions)
  • O change owner
  • m mark dir or file
  • * mark menu (/ dirs)
  • U unselect all
  • t toggle selection
  • C copy marked items to the right window !!!
  • R move marked to the right window

Misc

  • C-g cancel (for example search)
  • M-x run command
  • K lookup docs for the symbol under cursor
  • M-x org-mode enable Org mode
  • SPC t b toggle big font mode
  • SPC t F toggle full-screen mode
  • SPC t z toggle Zen mode
  • SPC i r insert from evil register using fuzzy counsel menu
  • C-x C-b C-k x open buffers, mark for deletion, execute

Plugins

treemacs

  • ? helpful Hydra

Magit

  • SPC g g enter magit, press ? for help
  • q quit (esc)
  • g refresh
  • s stage (S all)
  • u unstage (U all)
  • choose the line you want using visual lines mode!!
  • x discard lines (they will not be committed)
  • c commit
  • b branch
    • s new spinoff means move commit to that new branch and remove it from the parent branch
  • l log
    • l
  • t t tag commit
  • P push

Diff

  • d diff popup
  • D modify currently opened diff buffer args
  • M-n next hunk
  • M-p prev hunk
  • -/+ split/join hunks

evil-multiedit

  • M-d select next match
  • M-D select prev match
  • M-r select all matches
  • RET toggle selection

evil-snipe

  • s and type two letters - search next ; prev ,

avy

  • gs SPC - go to char
  • (setq avy-all-windows t) to your config.el to jump between windows (like Vimium?)

calendar

‘C-f’
     Move point one day forward (‘calendar-forward-day’).
‘C-b’
     Move point one day backward (‘calendar-backward-day’).
‘C-n’
     Move point one week forward (‘calendar-forward-week’).
‘C-p’
     Move point one week backward (‘calendar-backward-week’).
‘M-}’
     Move point one month forward (‘calendar-forward-month’).
‘M-{’
     Move point one month backward (‘calendar-backward-month’).
‘C-x ]’
     Move point one year forward (‘calendar-forward-year’).
‘C-x [’
     Move point one year backward (‘calendar-backward-year’).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment