LoginSignup
7

More than 5 years have passed since last update.

Coda2.5+Emmet 設定

Last updated at Posted at 2016-01-02

2016年05月19日にcoda2.5にEmmetが対応しました。詳しい情報やインストールはこちらからお願いします。

インストールの前に

今回の環境は以下のようになっています
- OSX 10.11.2
- Coda 2.5.10

Emmetインストール

インストール前の最低限の設定

ここからEmmetをダウンロード

zipを解凍してContents/Info.plistを次のように編集(これをしないとインストールできません)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>BuildMachineOSBuild</key>
    <string>14A389</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>Emmet</string>
    <key>CFBundleIconFile</key>
    <string>logo.tiff</string>
    <key>CFBundleIdentifier</key>
    <string>io.emmet.EmmetCoda</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>Emmet</string>
    <key>CFBundlePackageType</key>
    <string>BNDL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.1</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>CodaPlugInSupportedAPIVersion</key>
    <integer>6</integer>
    <key>DTCompiler</key>
    <string>com.apple.compilers.llvm.clang.1_0</string>
    <key>DTPlatformBuild</key>
    <string>6A1052c</string>
    <key>DTPlatformVersion</key>
    <string>GM</string>
    <key>DTSDKBuild</key>
    <string>14A382</string>
    <key>DTSDKName</key>
    <string>macosx10.10</string>
    <key>DTXcode</key>
    <string>0610</string>
    <key>DTXcodeBuild</key>
    <string>6A1052c</string>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright © 2012 serge.che@gmail.com. All rights reserved.</string>
    <key>NSPrincipalClass</key>
    <string>EMCodaPlugin</string>
    <key>SUEnableAutomaticChecks</key>
    <true/>
    <key>SUFeedURL</key>
    <string>http://download.emmet.io/coda/appcast.xml</string>
    <key>SUPublicDSAKeyFile</key>
    <string>dsa_pub.pem</string>
</dict>
</plist>

オプション設定

言語設定

設定はResources/snipets.jsonに保存されています。
一番上にあるvariablesを次のような感じで編集してください

"variables": {
    "lang": "ja",
    "locale": "ja-JP",
    "charset": "UTF-8",
    "indentation": "\t",
    "newline": "\n"
},

Emmetを.phpや.tplでも使えるようにする

この設定もResources/snipets.jsonに保存されています。
一番下の方に"haml": {ってかいてあるブロックがあるので、それをコピーして次のように貼りつけます。
今回は.phpと.tplに対応させてみました。

"haml": {
    "filters": "haml",
    "extends": "html",
    "profile": "xml"
},
"php": {
    "extends": "html",
},
"tpl": {
"extends": "html",
},

インストール

お待たせしました。あとはEmmet.codaplugin-masterというフォルダ名をEmmet.codapluginに変更して開けば自動的にCodaにインストールされるので、インストール終了後Codaを再起動して使ってください

インストール後の設定変更

~/Library/Application Support/Coda 2/Plug-insにEmmet.codapluginがあるので、右クリックしてパッケージの中身を表示させた後設定を変更してください。

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
7