summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2016-11-22 11:07:53 +0300
committerFrank LENORMAND <lenormf@gmail.com>2016-11-22 11:07:53 +0300
commit0c4c7ba240b472fca825de6719fb329520d7ff8a (patch)
treebd3a905ffacbc5fcf6d1aa9fa468a00c05c965ec
parent0b806cd4f17c1ad9e326ad4499192fc57afc12eb (diff)
Support xml based code in `html.kak`
This commit extends the range of mimetypes detected in `html.kak` to the following: * text/html * text/x-html * text/xml * application/xml * application/…+xml (e.g. xhtml, rss) Static .xml file will also be highlighted as HTML.
-rw-r--r--rc/base/html.kak4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/base/html.kak b/rc/base/html.kak
index 066a01a2..0621160a 100644
--- a/rc/base/html.kak
+++ b/rc/base/html.kak
@@ -4,11 +4,11 @@
# Detection
# ‾‾‾‾‾‾‾‾‾
-hook global BufSetOption mimetype=text/x-html %{
+hook global BufSetOption mimetype=(text/((x-)?html|xml)|application/((\w+\+)?xml)) %{
set buffer filetype html
}
-hook global BufCreate .*[.](html) %{
+hook global BufCreate .*\.(html|xml) %{
set buffer filetype html
}