Code Archive Skip to content Google About Google Privacy Terms
最近 zencoding.vim を大きく修正しました。とは言ってもこれまで単体テストを作ってきた事もあって、過去の動作を(なるべく)壊さずに大規模な修正が行えました。 これまでは一つのファイルに html, css, haml の処理が全て記述されていたのでとてもスパゲッティなコードになっていて、もう少し放っておくとカオスな状態になりかけていたので、ファイルを分割しインタフェースを揃える事にしました。 これにより、今後新しいフォーマットに対応する際にも、zencoding/lang にあるファイルの真似をして記述すれば実装出来る様になります。 haml に対応した 「えっ?前から対応してたんじゃないの?」と言われる方もいるかもしれませんが、これはあくまで expand abbreviation の haml フィルタとしてだけサポートしていました。 何が変わったかというと zen cod
Emmet is a plugin for many popular text editors which greatly improves HTML & CSS workflow: <!doctype html> <html lang="en"> <head> <title>Demo</title> </head> <body> | </body> </html> @@@ tooltip: Type CSS-like abbreviation type: ul#nav>li.item$*4>a{Item $} wait: 1000 tooltip: Run “Expand Abbreviation” action to expand it into HTML wait: 600 run: emmet.expand_abbreviation wait: 1000 tooltip: Trav
前々から気になっていた、Zen-Codingを試してみた。これはすばらしい!特にVimmer*1は迷わず使うべき。 プログラマの世界ではコピペは悪!しかし… 「"Hello."と3回表示するプログラムを書け」と言われたら、どう書く? puts "Hello."と書いて、コピペで3行にするのさ! puts "Hello." puts "Hello." puts "Hello." そんなわけない。もちろん、ループを使うだろう。 3.times { puts "Hello." } それでは、「HTMLで3項目からなるリストを書け」と言われたら? <ul> <li></li> <li></li> <li></li> </ul> ……今、liを書いてコピペして増やさなかった? こういうときも、プログラミングするときみたいに書ければなぁ。 という願望を満たしてくれるのが、Zen-Codingだ。このケ
前回の記事ではZen-Codingの導入方法について解説しました。 今回はZen-Codingの機能とそれを実行するためのショートカットの解説をします。 ※2010/02/22現在の最新バージョン「Zen Coding for Aptana v0.6.0.1」を対象にしています。 なおAptana(Eclipse)の場合だとAptanaの方の機能に多くのショートカットが割り当てられているので、利用する環境によってはショートカットを変更する必要があります。Zen-Codingのデフォルトのショートカットが機能しない場合は、記事最後にまとめる変更方法を参考にしてください。 Expand Abbreviation(省略コードの展開) Win:Ctrl+E mac:Command+E Zen-Codingの主な機能のひとつです。
はじめに 前回の記事の末尾で「つまりAptanaのプラグインとして何かしらのパッケージをインストールする、ということではなくて、各プロジェクト毎にZen-Coding用のスクリプトを配置していくんですね。」と書きましたが、どうやら別に各プロジェクト毎に設定する必要はないようです。 Aptanaでは、複数のプロジェクト(サイト)を同時に開いて作業を行うことができるようなので、Zen-Coding用のプロジェクトを予め作っておいて、常にそれを開いた状態にしておけば、他のプロジェクトのHTMLファイルを編集している時にもZen-Codingが使えるようです。 今回は、AptanaにZen-Codingを導入する方法について見てみます。 Zen-Codingのダウンロード まずはZen-Codingのダウンロード。Zen-Codingのオフィシャルサイトのダウンロードページから、「Zen Codi
EmEditorではマクロとして登録することでZenCodingを利用できます。 追記: EmEditorの公式サイトにモジュールが公開されています。 http://jp.emeditor.com/modules/mydownloads/viewcat.php?cid=54 EmEditor用のマクロファイルはEmEditorのフォーラムにポストされてます。 http://www.emeditor.com/modules/newbb/viewtopic.php?topic_id=1356&forum=19&post_id=4223#forumpost4223 これをコピペして、適当なファイル名でEmEditorのマクロディレクトリに保存。 標準ではMy Documentsの中にMy Macroがあると思います。 EmEditorのマクロメニューから、選択を選んで保存したZenCodingの
HTMLの記法について 基本的には「div」の様に要素を省略せずに記述して、それを展開すると「<div></div>」という形に展開されます。 このときに展開できる要素は以下の公式ドキュメントに明記されていますのでそちらを見るとよいです。 Zen HTML Elements Zen HTML Selectors Zen CheatSheets 基本的な記法 ひとつずつ順番に記述して説明していきます。しばらく初歩的な説明になるのである程度知っている方は飛ばしていただいて良いかと思います。 まずものすごく基本的な記法である、単独タグの記法について説明を行います。 cssのセレクタをイメージしながら見ていくと納得しやすいと思います。 タグだけ変換 変換前 div 変換後 <div></div> デモ 文末でtabを押してください div 変換後、div要素の間にカーソルが移動するので、すぐにテキ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く