Highlighting in files containing source code in more than one language

59 views
Skip to first unread message

Craig Maynard

unread,
Sep 5, 2024, 2:28:08 PM9/5/24
to BBEdit Talk
I have many files that contain several sections with source code in different languages. 

For example:

- Markdown files (.md) that also contain YAML frontmatter.
- Bash scripts (.sh) that also contain SQLite CLI commands.

I feel sure that BBEdit is capable of highlighting the code in each section appropriately. However, we rely on file extensions to indicate the type/structure of the file contents. That means BBEdit would need to use a pragma or something similar in the file contents to indicate a language change. That feels kludgy.

Comments welcome.

Gary Ash

unread,
Sep 6, 2024, 6:58:41 PM9/6/24
to BBEdit Talk
Love the idea though I bet it would take a good amount of work to see this done

it would be great if BBEdit could recognize a shebang or, dare i say, Emacs mode line comment to change syntax highlighting
Reply all
Reply to author
Forward
0 new messages