add rc/asciidoc.kak for asciidoc highlighting

This commit is contained in:
Maxime Coste 2012-08-08 19:38:27 +02:00
parent 1eb2b8321b
commit f59dd77f60
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,7 @@ hook global WinCreate .* %{ addhl number_lines }
runtime rc/cpp.kak runtime rc/cpp.kak
runtime rc/kakrc.kak runtime rc/kakrc.kak
runtime rc/asciidoc.kak
runtime rc/git.kak runtime rc/git.kak
runtime rc/global.kak runtime rc/global.kak
runtime rc/diff.kak runtime rc/diff.kak

11
src/rc/asciidoc.kak Normal file
View File

@ -0,0 +1,11 @@
hook global BufCreate .*\.asciidoc %{ setb filetype asciidoc }
hook global WinSetOption filetype=asciidoc %{
addhl group asciidoc-highlight
addhl -group asciidoc-highlight regex ^[^\n]+\n={2,}\h*$ 0:blue
addhl -group asciidoc-highlight regex ^[^\n]+\n-{2,}\h*$ 0:cyan
addhl -group asciidoc-highlight regex ^\h+[-\*]\h+([^\n:]+:)?[^\n]*(\n\h+[^-\*]\S+[^\n]*)*$ 0:yellow 1:green
}
hook global WinSetOption filetype=(?!asciidoc).* %{ rmhl asciidoc-higlight }