====== Micro ====== **File:** ''~/.config/micro/''\\ **Set as:** ''$EDITOR'' and ''$VISUAL'' in [[terminal:shell:profile|~/.profile.d/00-env.sh]] A modern, terminal-based text editor. Keybindings work like a normal GUI editor (Ctrl-S to save, Ctrl-Q to quit) — no modal editing. Good for quick server-side edits and the default for [[tilde:tools|BBJ]], commit messages, and any ''$EDITOR'' invocation. ===== Key Bindings ===== ^ Shortcut ^ Action ^ | ''Ctrl-S'' | Save | | ''Ctrl-Q'' | Quit | | ''Ctrl-Z'' | Undo | | ''Ctrl-Y'' | Redo | | ''Ctrl-F'' | Find | | ''Ctrl-H'' | Find and replace | | ''Ctrl-A'' | Select all | | ''Ctrl-C'' | Copy | | ''Ctrl-X'' | Cut | | ''Ctrl-V'' | Paste | | ''Ctrl-G'' | Go to line | | ''Ctrl-E'' | Run a command | | ''Ctrl-B'' | Toggle file browser sidebar | | ''Tab'' | Indent / trigger autocomplete | ===== Config (~/.config/micro/settings.json) ===== Key settings (~/.config/micro/settings.json): ^ Setting ^ Value ^ Notes ^ | ''autoindent'' | true | Can be toggled per-file | | ''tabsize'' | 4 | | | ''tabstospaces'' | true | Spaces, not tabs | | ''wordwrap'' | true | Soft wrap long lines | | ''ruler'' | true | Line numbers | | ''colorcolumn'' | 80 | Visual guide at 80 chars | | ''rmtrailingws'' | true | Strip trailing whitespace on save | | ''eofnewline'' | true | Ensure final newline | | ''syntax'' | true | Syntax highlighting | ===== Why Micro over Vim? ===== Micro is the ''/usr/bin/micro'' binary — no learning curve for modal editing, discoverable keybindings, works immediately over SSH. Used as the default ''$EDITOR'' everywhere on the homelab and tilde.town. [[terminal:editors:vim|Vim]] is still configured and used for heavier editing. ===== See Also ===== * [[terminal:editors:start|Terminal Editors Index]] * [[terminal:editors:vim|Vim]] * [[terminal:editors:nano|Nano]] * [[terminal:shell:profile|profile.d — environment variables]] * [[terminal:start|Return to terminal]]