<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 6 Jul 2016, at 17:25, Allan Odgaard wrote:</p>

<p dir="auto"></p></div>
<div style="white-space:pre-wrap"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div dir="auto">The gotcha here is that a scoped setting (like `text.xml`) takes precedence over a file pattern match (like `*.xml`), even when the latter is “more local” (in the file system).
</div></blockquote></div>
<div style="white-space:normal">

<p dir="auto">Just a correction, the precedence is file patterns (globs) → scopes → untargeted settings.</p>

<p dir="auto">The file patterns are ranked based on locality where the scope selectors are ranked based on how much of the scope they match, e.g. a global <code style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; padding:3px" bgcolor="#F7F7F7">text.plain</code> wins over a local <code style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; padding:3px" bgcolor="#F7F7F7">text</code>, and finally the untargeted settings are ranked based on locality (like the file patterns).</p>

<p dir="auto">It should probably just be intermixed, so a local untargeted setting wins over less local but targeted settings.</p>
</div>
</div>
</body>
</html>