2020-06-03 14:57:15 +02:00
|
|
|
# eRuby
|
|
|
|
# http://www2a.biglobe.ne.jp/~seki/ruby/erb.html
|
|
|
|
|
2021-05-24 13:18:50 +02:00
|
|
|
hook global BufCreate '.*\.erb' %{
|
2020-06-03 14:57:15 +02:00
|
|
|
set-option buffer filetype eruby
|
|
|
|
}
|
|
|
|
|
|
|
|
hook global WinSetOption filetype=eruby %{
|
|
|
|
require-module eruby
|
|
|
|
add-highlighter window/eruby ref eruby
|
2021-06-15 14:29:09 +02:00
|
|
|
hook -group eruby-indent window InsertChar '\n' html-indent-on-new-line
|
2020-06-03 14:57:15 +02:00
|
|
|
hook -always -once window WinSetOption filetype=.* %{
|
|
|
|
remove-highlighter window/eruby
|
2021-06-15 14:29:09 +02:00
|
|
|
remove-hooks window eruby-.+
|
2020-06-03 14:57:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
provide-module eruby %{
|
|
|
|
require-module ruby
|
|
|
|
require-module html
|
|
|
|
add-highlighter shared/eruby regions
|
|
|
|
add-highlighter shared/eruby/html default-region ref html
|
|
|
|
add-highlighter shared/eruby/simple-expression-tag region '<%=' '%>' ref ruby
|
|
|
|
add-highlighter shared/eruby/simple-execution-tag region '<%' '%>' ref ruby
|
|
|
|
add-highlighter shared/eruby/simple-comment-tag region '<%#' '%>' fill comment
|
|
|
|
}
|