3 ms·
The nice thing about Midnight Commander is that it has a hex viewer and editor.
by shmerl 3y ago
The nice thing about Midnight Commander is that it has a hex viewer and editor.
- oneshtein 3y agoMoreover, editor allows to switch to console via Ctrl-O, which turns it into an simple IDE for console programs: edit code, Ctrl-O, run program, Ctrl-C Ctrl-O, repeat.
- amne 3y agoI always thought the C-o subshell needed a status bar or something. Not once did I find myself launching mc again because I forgot it was already running. Luckily it warns you when launched from the subshell.
- JNRowe 3y agomc sets $MC_SID in the subshell, so you can query that in your prompt to mark prompts running under mc. Another option might be to bind F10 to start mc, so that it acts as a toggle whether in mc or in a non-mc shell. You'd need to wrap a zle widget in zsh, or add a '$if Bash' guard to your inputrc with bash.
- shmerl 3y agoWith neovim it's easy also with: * Ctrl+Z * Do something in the shell * fg
- machomaster 3y agoIt's not neovim, it's the general Unix shell functionality working with all programs.
- shmerl 3y agoSure, but it's a useful pattern.
- pangey 3y agoIt also can open/browse archive files without unpacking first.
- hulitu 3y agoIt unpacks them in a temporary directory.
- JNRowe 3y agoDepends on the archive type and how the vfs/extfs code was implemented for it¹. It also depends on how the archive is treated if it is compressed container, which can be seen by looking at how a .tar and .tar.xz are handled for example. The zip handler is probably the easiest to understand, as it doesn't need to contend with external compression wrappers and is a simple perl script. (In some cases it would probably be nicer if it did extract the entire archive to tmpfs, such as when you independently pull a few files from a massive .deb for example) Implementing your own extfs scripts to wrap a simple menu around some task can be really useful, far beyond basic archives. I wrote one so that I can shuffle my todo list priorities by moving fake "task files" in to different pseudo-directories. ¹ https://github.com/MidnightCommander/mc/tree/master/src/vfs/ https://github.com/MidnightCommander/mc/tree/master/src/vfs/