# Emacs Editor - Framework: - key bindings: - Chinese(rime) support: - modal editing: - : evil mode, enabled by default in doom-emacs. - ## Install or Update After deploying this nix flake, run the following command to install or update emacs: ```bash doom sync ``` ## Terminal Related zellij provides a more powerful and stable terminal experience, so here is zellij's terminal shortcuts I use frequently now: | Action | Zellij's Shortcut | | ------------------------- | ------------------ | | Floating Terminal | `Ctrl +

+ ` | | Horizontal Split Terminal | `Ctrl +

+ ` | | Vertical Split Terminal | `Ctrl +

+ ` | | Open file tree sidebar | `SPC + o + p` | ## Visual Modes The same as neovim/vim: | Action | Shortcut | | ------------------------ | ---------------------------------------- | | Toggle visual mode | `v` | | Toggle visual block mode | ` + v` (select a block vertically) | ## Text Manipulation - Add at the end of multiple lines: `:normal A` - Execublock: `:A` - visual block mode(ctrl + v) - Append text at the end of each line in the selected block - If position exceeds line end, neovim adds spaces automatically - Delete the last char of multivle lines: `:normal $x` - Execute `$x` on each line - visual mode(v) - `$` moves cursor to the end of line - `x` deletes the character under the cursor - Delete the last word of multiple lines: `:normal $bD` - Execute `$bD` on each line - visual mode(v) - `$` moves cursor to the end of line - `b` moves cursor to the beginning of the last word - `D` deletes from cursor to the end of line ## Splitting and Buffers | Action | Shortcut | | --------------------- | ----------------- | | Next Buffer (Tab) | `]b` | | Previous Buffer (Tab) | `[b` | | Save all buffers(Tab) | ` + b + S` | ## Editing and Formatting | Action | Shortcut | | ---------------------------------------- | ------------------- | | Format Document | ` + cf` | | Code Actions | ` + ca` | | Rename | ` + cr` | | Opening LSP symbols | ` + cS` | | Comment Line(support multiple lines) | ` + /` | | Open filepath/URL at cursor | `gf` | | Find files by keyword in path | ` + ` | | Grep string in files (vertico + ripgrep) | ` + sd` | ## Text Manipulation | Action | | | ---------------------------------- | --- | | Join Selection of Lines With Space | `J` | ## Search & replace ```bash SPC s p foo C-; E C-c C-p :%s/foo/bar/g RET Z Z ``` 1. `SPC s p`: search in project 1. `foo`: the keyword to search 1. `C-; E`: exports what you’re looking at into a new buffer in grep-mode 1. `C-c C-p` to run wgrep-change-to-wgrep-mode to make the search results writable. 1. `:%s/foo/bar/g RET`: replace in the current buffer(just like neovim/vim) 1. `Z Z`: to write all the changes to their respective files