2014-11-22 22:13:50 +03:00
|
|
|
hook global BufCreate .*\.java %{
|
|
|
|
set buffer filetype java
|
|
|
|
}
|
|
|
|
|
|
|
|
addhl -group / regions -default code java \
|
|
|
|
string %{(?<!')"} %{(?<!\\)(\\\\)*"} '' \
|
|
|
|
comment /\* \*/ '' \
|
|
|
|
comment // $ ''
|
|
|
|
|
|
|
|
addhl -group /java/string fill string
|
|
|
|
addhl -group /java/comment fill comment
|
|
|
|
|
2016-04-21 22:43:17 +03:00
|
|
|
addhl -group /java/code regex %{\b(this|true|false|null)\b} 0:value
|
|
|
|
addhl -group /java/code regex "\b(void|int|char|unsigned|float|boolean|double)\b" 0:type
|
|
|
|
addhl -group /java/code regex "\b(while|for|if|else|do|static|switch|case|default|class|interface|goto|break|continue|return|import|try|catch|throw|new|package|extends|implements)\b" 0:keyword
|
|
|
|
addhl -group /java/code regex "\b(final|public|protected|private|abstract)\b" 0:attribute
|
2014-11-22 22:13:50 +03:00
|
|
|
|
2016-09-25 16:15:07 +03:00
|
|
|
hook -group java-highlight global WinSetOption filetype=java %{ addhl ref java }
|
2016-09-28 09:45:01 +03:00
|
|
|
hook -group java-highlight global WinSetOption filetype=(?!java).* %{ rmhl java }
|