Skip to content

Instantly share code, notes, and snippets.

@nissuk
Created May 5, 2011 13:41
Show Gist options
  • Save nissuk/957044 to your computer and use it in GitHub Desktop.
Save nissuk/957044 to your computer and use it in GitHub Desktop.
Aptana Studio 3: my_zen_settingsの設定を有効にする
"""
1. メニューの Commands > Zen Coding > Edit this bundle を選択して
Zen Codingプロジェクトを表示させる
2. lib/zencoding/my_zen_settings.py を編集する
3. lib/zencoding/zen_settings.py を下記のように編集する
a. my_zen_settingsをimportする(冒頭)
b. zen_settingsとmy_zen_settingsをマージする関数を定義する(冒頭)
c. zen_settingsとmy_zen_settingsをマージする (一番最後)
これで一応my_zen_settingsの設定が有効になります。もっと普通の方法は…?
環境:
- Windows7 32bit
- Aptana Studio 3(build: 3.0.1.201104291443)
- Python 3.2
"""
# a
from my_zen_settings import my_zen_settings
# b
def merge(a, b):
for (k, v) in b.items():
if k in a and isinstance(a[k], dict) and isinstance(v, dict):
merge(a[k], v)
else:
a[k] = v
"""
Zen Coding settings
@author Sergey Chikuyonok ([email protected])
@link http://chikuyonok.ru
"""
zen_settings = {
# 略
}
# c
merge(zen_settings, my_zen_settings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment