For many years I’ve been using SSH sessions on my PC to talk to headless SBCs such as Raspberry Pi. I HATE monochrome editing and almost as badly hate 16-colour editor. Be wary before going further that 256-colours is not for every situation.
Disclaimer out of the way – with Nano editor and my chosen PC tool Mobaxterm I’ve been stuck in that last-century mode for some time – and Mobaxterm documentation doesn’t help – I’m as good as anyone at finding solutions on Google – but wasted many an hour on this one – until now.
Mobaxterm, only when creating or EDITING a session has the option to change the default 16-colour mode (xterm) to 256 colours (xterm-256color). See that EDIT SESSION on the right?
Once in there, under BASIC SSH SETTINGS – TERMINAL SETTINGS – there is an option TERMINAL TYPE and XTERM-256COLOR is in there – see below.
With that set, I go onto my SBC SSH session and open MC (Midnight commander) – not MCEDIT. If MC is not installed – apt install mc (assuming ROOT user – if not, sudo apt install mc
In mc-options-appearance – not easy to find with the default colours – you can select 256 colour themes – some are built-in, others can be added. MODAR-256THIN is my current favourite.
From there – when editing a file, use MCEDIT which aside from it’s ropey external copy-paste provides a comfy environment for editing files. See example below… note the rather awful default terminal colours above…
That black background next to opening braces above is a trailing SPACE – not sure why the theme designer(s) made that happen..
Great article on enhancing the SSH session experience! Switching to 256-color mode in Mobaxterm significantly improves the editing environment, especially with tools like MC and MCEDIT.
For anyone frequently working with headless SBCs, this is a must-try tip. Speaking of editing, if you’re looking for a powerful and [url=https://thecapapkscut.com/how-to-get-templates-on-capcut/]user-friendly video editor[/url], CapCut is an excellent tool to check out. Thanks for sharing these useful insights!
black spaces: it’s not a theme fault… it’s the editor telling you that you forgot some spaces there, which should not be…
thank the editor for that, not blame: spaces at EOL could cause issues, often, ESPECIALLY if they come after a “\” sign in bash (which states current line continues on the following one…)
remove them, lines should end with a character, NOT a space…