Get Started Micro Editor
Micro editor is a text editor for coders. It's probably the easiest TUI (text user interface) editor to start, but provides extensive features for programmers.
Learn how to start your journey with micro!
It's so simple, but allows the advanced features I need. And it even has a nice, simple way to write plugins. Works great with 'tmux', the terminal multiplexer.
Rant
<rant>I felt uneasy for sending my code to a foreign megacorporation to be sold ... to be used as AI fodder for improving their product. I did not want surprise telemetrics, especially ones that turn on after I've declined. Also, I did not want to be running a single purpose copy of a web browser such as Chrome, then running an editor written in JavaScript inside that, then downloading further random closed source binaries as I try to use it (with possible further license and EULA surprises). </rant>
So I chose micro as my editor.
Quick Start for Coders
This installs micro with my plugins Jump F4 symbol jump. Palettero command palette, Runit F5 compile, Cheat F1 cheatsheets:
$ sudo apt-get update
$ sudo apt-get -y install micro fzf exuberant-ctags
$ micro --plugin install jump
$ micro --plugin install palettero
$ micro --plugin install runit
Some micro settings I find helpful. Press Ctrl-E when editing in micro to give commands:
ctrl-E> set colorscheme simple
ctrl-E> set tabstospaces false
ctrl-E> set ftoptions false
ctrl-E> set softwrap true
ctrl-E> set wordwrap true
Now you can even convert spaces to tabs with Ctrl-E "retab".
If you're using 'tmux' (the Terminal multiplexer), 'export TERM=tmux-256color' to re-enable selection with shift-up, shift-left etc.
Micro has many typical features found in many IDEs and coder's editors
- Indent - shift-tab, tab to indent and deindent current line (or selection)
- Bubbling - alt-up, alt-down to move current line (or selection)
- Duplicate - ctrl-D duplicate current line (or selection)
- Jump by word - ctrl-left, ctrl-right
- Select whole lines - shift-up, shift-down
- Line numbers - ctrl-R ruler
It has a nice plugin interface. The plugins you just installed let you
- F5 run the document you're editing
- For 'make' users, compile the whole project F9; or with full 'make' output F12.
- F4 jump to symbol (function, class or even a Markdown heading)
- Ctrl-space to run a command on selection
- Ctrl-space "editmenu" to add your own commands. Is this the easiest alternative to writing your own plugins?
I'm not sure if I really like the editor suggesting me things when I'm trying to type. But if you do, there is micro-lsp. It's an experimental plugin for LSP (language server protocol) support. It gives you alt-K hover: "What parameters does this function take?". Alt-D jumps to definition. Luckily, micro-lsp only suggests you things when you press alt-K, not every time you touch the keyboard. User: "F". Editor: "Did you mean FactoryClassGeneratorFactoryFactory?"
If you want, you can bind keys. My favourites include binding "Ctrl-w" to "DeleteWordLeft".
Read more about micro. Tell us your favourite micro features in comments.
Adminstrivia
Micro editor logo and micro editor copyright Zachary "zyedidia" Yedidia. Retrieved under the MIT "Expat" license.
This article has been updated after publishing.