From 0c4c7ba240b472fca825de6719fb329520d7ff8a Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Tue, 22 Nov 2016 11:07:53 +0300 Subject: [PATCH] Support xml based code in `html.kak` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- rc/base/html.kak | 4 ++-- 1 file 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 }