LoginSignup
3
3

More than 5 years have passed since last update.

Coda 2 の mode メモ

Last updated at Posted at 2012-05-23

Coda 2 は旧バージョンと mode の互換性がないので、移行するための Tips。

設置場所

style: ~/Library/Application Support/Coda 2/Styles
mode: ~/Library/Application Support/Coda 2/Modes

SSS

sss の 要素は各 mode パッケージの中にある、SyntaxDefinition.xml の各ノード scope 属性に対応している

XML_SyntaxDefinition.xml
<keywords id="Tags" useforautocomplete="no" scope="markup.tag">
CodaClassic.sss
markup.tag {
  color:#881280;
  font-weight:normal;
}

また、dot で区切った scope の上位から継承されるようになっている。以下の場合 scope="markup.tag.attribute.name" のシンタックスは bold で表示される。

sample.sss
markup.tag {
  color:#881280;
  font-weight:bold;
}

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

SyntaxDefinition.xml に記述されていた color, background-color, font-weight ... などのスタイルに関する属性は無視される。

1.x の mode ファイルを ~/Library/Application Support/Coda 2/Modes に設置して、Preferences で選択できても、シンタックスハイライトが行われないのは、これが理由。

Arduino_SyntaxDefinition.xml.patch
16c16
<             <keywords id="Arduino Functions" color="#FF8000" casesensitive="no" useforautocomplete="yes">
---
>             <keywords id="Arduino Functions" scope="language.function" casesensitive="no" useforautocomplete="yes">
3
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3