# Migrating Coda modes to Coda 2

*2012-05-23*

Coda 1.x modes are not compatible with Coda 2.

This is how to migrate Coda 1.x modes to Coda 2.

<!--more-->

## Locations
<dl>
<dt>style</dt><dd>~/Library/Application Support/Coda 2/Styles</dd>
<dt>mode</dt><dd>~/Library/Application Support/Coda 2/Modes</dd>
</dl>

## SSS
`.sss` elements match `scope` attributes of each nodes in `SyntaxDefinition.xml `.

```xml
<keywords id="Tags" useforautocomplete="no" scope="markup.tag">
```

```css
markup.tag {
  color:#881280;
  font-weight:normal;
}
```

The sss rules are inherited from upper scope separated by dots.

```css
markup.tag {
  color:#881280;
  font-weight:bold;
}

markup.tag.attribute.name {
  color:#994500;
}
```

Style attributes defined in `SyntaxDefinition.xml` such like `color`, `background-color`, `font-weight` ... would be ignored.

This is the why the modes located in `~/Library/Application Support/Coda 2/Modes` are selectable but no effects.

```diff
-             <keywords id="Arduino Functions" color="#FF8000" casesensitive="no" useforautocomplete="yes">
+             <keywords id="Arduino Functions" scope="language.function" casesensitive="no" useforautocomplete="yes">
```


