To change keybindings, open ~/.config/micro/bindings.json
file (or create such if it does not exist) and put your own
commands like so:
{
"Ctrl-j": "CursorLeft",
"Ctrl-l": "CursorRight",
"F6": "VSplit",
"F7": "HSplit"
}
Then restart micro. Now you can move left/right with Ctrl-j and Ctrl-l.
F6 now splits screen vertically, while F7 - horizontally. To jump between splits, use default Ctrl-w hotkey.
Micro is pretty usable with its defaults, I personally have only 4 keybindings in my config (they’re shown above). It’s strange that micro hasn’t default hotkeys for splitting, so for me it’s essential to bind them.
How to check if you can bind a key
Micro is a terminal-based editor, so it recieves what a terminal emulator
sends. Sadly, terminal emulators are broken as fuck, so before binding you
should check what your terminal emulator sends to micro. It’s very
easy: open micro’s command prompt with Ctrl-e
and type raw
, then press Enter. Then start typing your
keybindings, and micro will echo what it gets:
Here, for example, Ctrl-h acts like backspace, while Ctrl-i is the Tab key.
If you see what you’ve typed, then it means that you can bind this key without any problems.