Yet another YAML syntax file for Vim
Vimにデフォルトで入ってるYAMLのシンタックスファイルでPlaggerの設定を弄ってると
# before plugins: - module: Subscription::Config config: feed: - url: http://www.examle.com
(スタイルシートを有効にしてカラーディスプレイでご覧下さい)
と変にハイライトされてきもいので新しく書いてみた。
# after plugins: - module: Subscription::Config config: feed: - url: http://www.examle.com
こんな風になる。
元のはブロックにも対応していなかったので、ハイライトするようにした。
# before text: |- You can browse the plugin repository by simply going to source:trunk/plagger/lib/Plagger/Plugin directory. Document for each plugin is available as in POD document, which is available as HTML on Search CPAN distribution page. We're in the active development right now. API and config file format might be changed in the future.
# after text: |- You can browse the plugin repository by simply going to source:trunk/plagger/lib/Plagger/Plugin directory. Document for each plugin is available as in POD document, which is available as HTML on Search CPAN distribution page. We're in the active development right now. API and config file format might be changed in the future.
YAMLの文法はよく分からないので完璧なハイライトができる訳ではないと思いますが。
インデントの深さを用いたマッチには、\z() ... \z1(ひとつの:syntax中でグローバルな後方参照みたいなもの)を利用しています。こんなの初めて知った。
文章は http://plagger.org/trac/wiki からコペペ。
Writebacks
Trackback
このエントリへのトラックバック pingは まで。