Use SPC h w to find shortcut or command
| Combination | Description |
|---|---|
g g |
Move cusor to first line |
G |
Move cusor to last line |
M-< |
Move cursor to start of the file |
M-> |
Move cursor to end of the file |
| Combination | Description |
|---|---|
SPC w v |
Split verically |
SPC w d |
Close active |
SPC w w |
Swith focus to next |
SPC w W |
Swith focus to previous |
| Combination | Description |
|---|---|
SPC o t |
Open vterm popup |
SPC o T |
Open vterm window |
CTRL c CTRL c |
Send cancel command to terminal |
CTRL l |
Clear terminal |
| Combination | Description |
|---|---|
SPC f s |
Save current file |
CMD s |
Save current file |
SPC s b |
Search current file |
SPC s p |
Search current project |
SPC c d / g d |
Open reference |
SPC c D / g D |
Open reference usage list popup |
SPC SPC |
File file inside of project |
SPC f r |
Find recent file |
CTRL SPC |
Open autocomplete popup |
C-u C-c C-c |
Render plantuml in new window |
| Search string | Result |
|---|---|
#gifts |
Any words that contain 'gifts' |
#gifts -- -s |
Case sensitive substring |
#gifts -- -w |
Whole word (gifts, Gifts, …) |
#gifts -- -sw |
Exact word gifts |
- One way is to use buffer search via
SPC s b - Another one is i-search:
- Open via
C-s - Type search entry
- Toggle between results with
C-s(forward) andC-r(backwards) - Use
C-s C-wto search the whole word without typing in
- Open via
- Simple search with
C-s ENTER. It finds the first entrance of search query
replace-stringcommand. Case sensetinve replacementM-x replace-string ENTER foo ENTER buz
- Query replacement. Goes from one to another awaiting you coomand to replace or to skip
M-% foo ENTER buzSPACE/yto replacento skip
- Update brew via
brew update - Upgrade brew via
brew upgrade - Add emacs plus brew repository via
bew tap d12frosted/emacs-plus - Install emacs plus via
brew install emacs-plus - Create a link in applications directory via
ln -s /opt/homebrew/opt/emacs-plus@28/Emacs.app /Applications - Launch emacs and check if it works
- Install git if it's not installed
- Install deps via
brew install ripgrep coreutils fd - Clone doom emacs repo via
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d - Install doom emacs via
~/.emacs.d/bin/doom install - Add global
doomcommand by adding the directory to your PATH- Add
export Path="$HOME/.emacs.d/bin:$PATH"to.zshrc - Execute
.zshrcin current terminal session viasource .zshrc
- Add
Doom usage:
- Run
doom doctorto check for errors and warnings - Run
doom syncto syncronyze your private config with doom and install missing packages
Links:
- Emacs Plus github repository
- Doom emacs github repository
- Doom installation and configuration video by Zaiste
- Inside
init.elfind:langsection and uncomment languages you need - Reload via
SPC h r r
- Inside
init.elfind:termsection and uncommentvterm - Reload via
SPC h r r - Open vterm window via
SPC o T. It may require additional installation during the first launch
To open vterm popup use SPC o t
- Inside
init.elfind:uisection and uncommenttreemacs - Reload via
SPC h r r - Open project
- Use
SPC o pto open project explorer
- Open
config.el - Add following code:
(require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ;; Comment/uncomment this line to enable MELPA Stable if desired. ;; See `package-archive-priorities` and `package-pinned-packages`. ;; Most users will not need or want to do this. ;; (add-to-list 'package-archives ;; '("melpa-stable" . "https://stable.melpa.org/packages/") t) (package-initialize) - Reload doom via
SPC h r r - Run
package-refresh-contentscommand (SPC :and search) - Run
package-install one-themes - Add following code to
config.el- For light theme:
(use-package one-themes :init (load-theme 'one-light t)) - For dark theme:
(use-package one-themes :init (load-theme 'one-dark t))
- For light theme:
- Reload doom via
SPC h r r
Links:
- Open
config.el - Add following code
(defun cut-region (beg end) "Copies the text to the kill buffer and deletes the selected region." (interactive "r") (copy-region-as-kill beg end) (delete-region beg end)) (map! "s-x" #'cut-region) - Reload doom via
SPC h r r
- Options -> Set default font...
- Configure
- Add following code to
config.el:(setq-default tide-user-preferences '(:importModuleSpecifierPreference "relative" :includeCompletionsForModuleExports t :includeCompletionsWithInsertText t :allowTextChangesInNewFiles t)) - Restart doom emacs
Links:
- eslint fix current file
- multiple cursor usage
- find and replace within file
- find and replace within project
- spellcheck
- Markdown live preview
- Autocomplete case insensitive
- Vterm option + backspace
- Vterm CMD + backspace
- Vterm cursor move