micro icon indicating copy to clipboard operation
micro copied to clipboard

Syntax highlighting in crontab, ssh_config/sshd_config, and other files

Open rakaw opened this issue 4 years ago • 2 comments

crontab sshd_config Hi, as you can see above, the crontab syntax highlighting is not registering because when i run crontab -e to edit my crontab file, the directory is /tmp/crontab.* instead of the one specified here.

As for editing ssh_config & sshd_config in /etc/ssh/, could you implement syntax highlighting like in vim: vim_sshd_config

Also would it be possible to provide syntax highlighting for all files starting with # symbols for comments? (for all ft:unknown) Here i made a file called ~/repos/hi with no file extension. In vim the syntax highlighting for comments is like so: comment

Commit hash: cfcb2e45 (same on ba98b55) OS: Linux - Garuda Gnome Terminal: gnome-terminal

rakaw avatar Feb 10 '21 01:02 rakaw

I have the same experience but not with the same files. For example, crontab -e displays correctly: image While micro /etc/fstab does not: image

Notice that, when this happens, the status bar always displays "ft:unknown" vs "ft:shell" -- see images. I'm not sure what this status indicates but it appears it doesn't know it is running a shell?

Micro version: 2.0.9 OS: Linux - Mint 21.2 Cinnamon Terminal: gnome-terminal

RodBarnes avatar Jan 02 '24 01:01 RodBarnes

Ah, I bet "ft" is "file type" and it's saying it is unable to determine what type of file it is and doesn't know what syntax rules to use.

RodBarnes avatar Jan 02 '24 07:01 RodBarnes