- When Emacs opens a file named "bash-fc.NNNNNN.bash", it'll enable sh-mode automatically, and even start a LSP server for Bash if configured properly. - VS Code behaves similarly.
If you've never used a code editor with automatic syntax highlighting, give them a try.