If I want to run a shell comand, I have to type CtrlB and then type out the command in full.
micro process is sent to the background, dropping me back to shellfgmicro screen returns; resume my editing session.This behaviour is seen in vi and clones (press ^Z to suspend) and many emacsen (on GNU Emacs it's M-x suspend-emacs)
I'm not sure how this could be done or if it is possible. I still have to look into a more.
For a temporary solution you can always press Ctrl B and then execute bash. To run a shell.
I'm not sure if it's portable to micro (since my editor uses termbox) and it's Linux only (possibly other unix-likes as well? I don't have any lying around to try) but this implementation, based on the one in godit, Works On My Machineâ„¢.
https://github.com/japanoise/gomacs/commit/ee95d6fcd6700773a83b3ae941a2891afb548e74
This functionality has been added for Linux only. It may be possible to implement on unix but the syscalls used in godit/gomacs are only available on linux.
You can create a binding by adding the following to bindings.json:
{
"CtrlZ": "Suspend",
}
FWIW I find this to be pretty buggy - if I suspend in bash, then reopen the program with fg, then suspend again, the display doesn't refresh properly, and I get some pretty weird and bizarre visual glitches. If you suspend, then un-suspend, then re-suspend, does anyone else get this problem?
I use xonsh as my main terminal btw, and suspend doesn't work there at all, but rather crashes everything.
Most helpful comment
This functionality has been added for Linux only. It may be possible to implement on unix but the syscalls used in godit/gomacs are only available on linux.
You can create a binding by adding the following to
bindings.json: