@@ -1,80 +0,0 @@ |
| 1 | -# Micro — keys & workflow (fish + plugins) | | |
| 2 | - | | |
| 3 | ---- | | |
| 4 | - | | |
| 5 | -## Core (built-in) | | |
| 6 | -- **Ctrl-E** — Command bar. Run `help …`, `plugin list`, `open`, `fzfinder`, `log`, etc. | | |
| 7 | -- **Ctrl-S** — Save. **Ctrl-Q** — Close current buffer (quit if last). **Ctrl-O** — Open file (fallback; you’ll usually use **Alt-f**). | | |
| 8 | - | | |
| 9 | ---- | | |
| 10 | - | | |
| 11 | -## fzfinder (fast file open) | | |
| 12 | -**Open:** **Alt-f** | | |
| 13 | -**What it does:** Fuzzy-find files using our git-aware wrapper (`mfzf`). In repos it lists `git ls-files`; otherwise it uses `fd`. Preview shows with `bat`. Opens in a **new tab**. | | |
| 14 | - | | |
| 15 | -**Inside the picker (fzf):** | | |
| 16 | -- Type to filter; **↑/↓** or **Ctrl-j/Ctrl-k** to move | | |
| 17 | -- **Enter** open selection **Tab / Shift-Tab** multi-select (if enabled) | | |
| 18 | -- Our options: `--height=85% --layout=reverse [--multi] --preview 'bat -f -p {}'` | | |
| 19 | - | | |
| 20 | -**Tweakable:** | | |
| 21 | -- `settings.json` → `fzfarg`, `fzfopen` (`newtab` or `open`), `fzfpath` (`relative` or `absolute`). | | |
| 22 | -- Edit `/usr/local/bin/mfzf` to ignore heavy dirs (`node_modules`, `dist`, `target`, …). | | |
| 23 | - | | |
| 24 | ---- | | |
| 25 | - | | |
| 26 | -## Palettero (command palette) | | |
| 27 | -**Open:** **Ctrl-P** (also **Alt-Ctrl-Space**) | | |
| 28 | -**What it does:** Fuzzy-search *any* Micro/plug-in command (and text filters) and run it. Great for discovery. | | |
| 29 | - | | |
| 30 | -**Use:** Open → type (“jump”, “tree”, “help fzfinder”, “pipe jq .”, …) → **Enter**. | | |
| 31 | - | | |
| 32 | -**Pro tip:** add your favorite one-liners as palette items (JSON format via `editmenu`), e.g. JSON pretty, YAML⇄JSON, sort unique. | | |
| 33 | - | | |
| 34 | ---- | | |
| 35 | - | | |
| 36 | -## Quickfix (project grep & jump) | | |
| 37 | -**Search word under cursor:** **Alt-g** | | |
| 38 | -**Prompted search:** **Ctrl-Alt-g** | | |
| 39 | -**What it does:** Runs ripgrep (`rg -n`) and drops results into a quickfix list. Select a line → **Enter** jumps to file/line. | | |
| 40 | - | | |
| 41 | -**Flow:** Trigger search → use **↑/↓** to browse results → **Enter** to jump. Close the panel when done. | | |
| 42 | - | | |
| 43 | ---- | | |
| 44 | - | | |
| 45 | -## runit (run/build) | | |
| 46 | -**Run current file:** **F5** **Make:** **F12** **Make (background):** **F9** | | |
| 47 | -**What it does:** Saves & runs the active file (language/shebang aware). In projects with a `Makefile`, use F12/F9 for builds. | | |
| 48 | - | | |
| 49 | -**Tips:** | | |
| 50 | -- For scripts, add a proper shebang (e.g., `#!/usr/bin/env python3`) so F5 “just works”. | | |
| 51 | -- Use the command bar to run custom commands on demand if there’s no Makefile. | | |
| 52 | - | | |
| 53 | ---- | | |
| 54 | - | | |
| 55 | -## Filemanager (side tree) | | |
| 56 | -**Toggle tree:** **Ctrl-b** | | |
| 57 | -**What it does:** Opens/closes a file tree pane you can navigate with arrows and open with **Enter**. Handy for quick browsing. | | |
| 58 | - | | |
| 59 | -**Tip:** Set `filemanager.openonstart = true` if you want it by default (add in `settings.json`). | | |
| 60 | - | | |
| 61 | ---- | | |
| 62 | - | | |
| 63 | -## Jump (symbols / headings) | | |
| 64 | -**Open outline:** **F4** | | |
| 65 | -**What it does:** Fuzzy-jump within the current buffer (functions, classes, Markdown headings, etc.). | | |
| 66 | - | | |
| 67 | ---- | | |
| 68 | - | | |
| 69 | -## LSP (optional) | | |
| 70 | -**What it does:** Hover/definition/references/completion/formatting with language servers. | | |
| 71 | -**Typical defaults:** hover, go-to-definition, references, completion (check `help lsp` after installing servers). | | |
| 72 | - | | |
| 73 | ---- | | |
| 74 | - | | |
| 75 | -## Handy palette one-liners | | |
| 76 | -Run these from **Ctrl-E** (or bind keys to them): | | |
| 77 | -- `pipe jq .` — pretty-print JSON | | |
| 78 | -- `pipe yq -P` — pretty JSON→YAML (needs `yq`) | | |
| 79 | -- `pipe sort -u` — sort unique lines | | |
| 80 | -- `pipe sed -E 's/[[:space:]]+$//'` — strip trailing whitespace | | |