docs: emacs

This commit is contained in:
Ryan Yin
2024-01-04 18:47:21 +08:00
parent 0667011531
commit 0a5f4dacba
2 changed files with 26 additions and 17 deletions

View File

@@ -29,6 +29,13 @@ when in doubt, run `doom sync`!
2. Better support for Lisp-like Languages. 2. Better support for Lisp-like Languages.
3. Org Mode 3. Org Mode
## Structured editing of S-expression data
- [ParEdit](https://www.emacswiki.org/emacs/ParEdit)
- [lispy](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/lispy)
- [parinfer](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/parinfer)
- Formatting: `M-x pp-buffer`
## Terminal Related ## Terminal Related
zellij provides a more powerful and stable terminal experience, so here is zellij's terminal shortcuts I use frequently now: zellij provides a more powerful and stable terminal experience, so here is zellij's terminal shortcuts I use frequently now:
@@ -87,20 +94,23 @@ The same as neovim/vim:
## Editing and Formatting ## Editing and Formatting
| Action | Shortcut | | Action | Shortcut |
| ---------------------------------------- | ------------------- | | ------------------------------------------ | ------------------- |
| Format Document | `<Space> + cf` | | Format Document | `<Space> + cf` |
| Code Actions | `<Space> + ca` | | Code Actions | `<Space> + ca` |
| Rename | `<Space> + cr` | | Rename | `<Space> + cr` |
| Opening LSP symbols | `<Space> + cS` | | Opening LSP symbols | `<Space> + cS` |
| Show all LSP Errors | `<Space> + c + x/X` | | Show all LSP Errors | `<Space> + c + x/X` |
| Jump to Definition | `gd` | | Show infinite undo history(really useful!) | `<Space> + s + u` |
| Jump to References | `gD` | | Fold the current code block | `zc` |
| (Un)Comment the selected context | `gc` | | Unfold the current code block | `zo` |
| (Un)Comment the current line | `gcc` | | Jump to Definition | `gd` |
| Open filepath/URL at cursor | `gf` | | Jump to References | `gD` |
| Find files by keyword in path | `<Space> + <Space>` | | (Un)Comment the selected context | `gc` |
| Grep string in files (vertico + ripgrep) | `<Space> + sd` | | (Un)Comment the current line | `gcc` |
| Open filepath/URL at cursor | `gf` |
| Find files by keyword in path | `<Space> + <Space>` |
| Grep string in files (vertico + ripgrep) | `<Space> + sd` |
## Text Manipulation ## Text Manipulation

View File

@@ -59,7 +59,7 @@
(format +onsave) (format +onsave)
; automated prettiness ; automated prettiness
;;lispy ; vim for lisp, for people who don't like vim ;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent ;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of ;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates ;;rotate-text ; cycle region at point between text candidates
@@ -89,7 +89,7 @@
;;ansible ;;ansible
;;biblio ; Writes a PhD for you (citation needed) ;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends ;;collab ; buffers with friends
;; debugger ; FIXME stepping through code, to help you add bugs ;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv ;;direnv
(docker +lsp) (docker +lsp)
editorconfig ; let someone else argue about tabs vs spaces editorconfig ; let someone else argue about tabs vs spaces
@@ -105,7 +105,6 @@
;;prodigy ; FIXME managing external services & code builders ;;prodigy ; FIXME managing external services & code builders
(terraform +lsp) (terraform +lsp)
; infrastructure as code ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree... tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp ;;upload ; map local to remote projects via ssh/ftp