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.
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
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
| Action | Shortcut |
| ---------------------------------------- | ------------------- |
| Format Document | `<Space> + cf` |
| Code Actions | `<Space> + ca` |
| Rename | `<Space> + cr` |
| Opening LSP symbols | `<Space> + cS` |
| Show all LSP Errors | `<Space> + c + x/X` |
| Jump to Definition | `gd` |
| Jump to References | `gD` |
| (Un)Comment the selected context | `gc` |
| (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` |
| Action | Shortcut |
| ------------------------------------------ | ------------------- |
| Format Document | `<Space> + cf` |
| Code Actions | `<Space> + ca` |
| Rename | `<Space> + cr` |
| Opening LSP symbols | `<Space> + cS` |
| Show all LSP Errors | `<Space> + c + x/X` |
| Show infinite undo history(really useful!) | `<Space> + s + u` |
| Fold the current code block | `zc` |
| Unfold the current code block | `zo` |
| Jump to Definition | `gd` |
| Jump to References | `gD` |
| (Un)Comment the selected context | `gc` |
| (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

View File

@@ -59,7 +59,7 @@
(format +onsave)
; automated prettiness
;;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
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
@@ -89,7 +89,7 @@
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;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
(docker +lsp)
editorconfig ; let someone else argue about tabs vs spaces
@@ -105,7 +105,6 @@
;;prodigy ; FIXME managing external services & code builders
(terraform +lsp)
; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp