When opening a file, CotEditor detects the document type and applies the corresponding syntax automatically.
The File Mapping definitions in each syntax are used for this detection.
CotEditor detects the corresponding syntax in the following order:
#! or the next term to the path if the path targets env.#!/usr/bin/perl → Perl (interpreter: perl)#!/usr/bin/env python3 → Python (interpreter: python3)<?xml version="1.0" encoding="utf-8"?> → XMLWhen there are multiple syntaxes in the same level like the file extension level or the filename level, custom syntaxes are prioritized over the bundled syntaxes. And yet, if there are multiple corresponding syntaxes, the firstly found syntax is used automatically.
To define the rules to map files for a syntax, select File Mapping from the list on the left of the syntax editor, then add file extensions, filenames, or interpreters to the lists on the right side. See Define a syntax for how to open the syntax editor.
There are no conflicts among the bundled syntaxes. However, if you added custom syntaxes or modified the bundled syntaxes, the file mapping can conflict. You can see the existence of mapping conflicts from the Show File Mapping Conflict command in the Action pop-up menu for the available syntaxes list in the Format settings. If the menu item is dimmed, it means there is no conflict.
You can just leave the file mapping conflicts as long as you can open files with your expected syntax. There is no side issue.