Dolphin recognizes various files of different types:
.bashrc as “Plain text document”:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != i ]] && return
...bla...
.bash_aliases as “Shell script”
#!/bin/bash
alias ls='\ls --color'
alias ll='ls -l'
alias la='ls -lA'
...bla again...
- Right-clicking on .bashrc shows as first option “Open with Kate”.
The opened file is then recognized as type “bash”, and syntax highlighting is enabled. - In contrast, the script file .bash_aliases shows “Open with Vim” as first entry, not Kate (not either in “Open with >”). When opened (via Open menu or DnD) it is recognized as type “normal”, and syntax highlighting is disabled.
I would expect Kate to automatically recognizes when it’s opening a script file (it even contains a shebang).
My system is somewhat older, but I’m pretty sure this is already the case with a fresh installation.
Do you have any idea if this is due to Dolphin or Kate, or maybe some other reason entirely? And how can I set this up so that it works as expected?