From a65f2b1d985c73c3b4cd25d7a25e783ae8c810c4 Mon Sep 17 00:00:00 2001 From: Alex Vear Date: Sat, 15 Feb 2020 20:01:31 +0000 Subject: [PATCH] Allow lower case in option keys and dynamic block markers For example previously only `#+TITLE: Foo` would have syntax highlighted `Foo` correctly. Now all case variants will work (e.g. `#+title: Foo` and `#+tItLE: Foo`). The same has been done to dynamic block markers so now this will also work: #+begin_src lisp (if (< 1 2) (print "True!") (print "False!)) #+end_src --- syntax/org.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/syntax/org.vim b/syntax/org.vim index 85268d1..9475d45 100644 --- a/syntax/org.vim +++ b/syntax/org.vim @@ -37,7 +37,7 @@ highlight def link orgUnderlineDelimiter orgUnderline " Options syntax match orgOption /^\s*#+\w\+.*$/ keepend -syntax region orgTitle matchgroup=orgOption start="^\s*#+TITLE:\s*" end="$" keepend oneline +syntax region orgTitle matchgroup=orgOption start="\c^\s*#+TITLE:\s*" end="$" keepend oneline highlight def link orgBlockDelimiter SpecialComment highlight def link orgOption SpecialComment @@ -48,9 +48,9 @@ highlight def link orgTitle Title syntax region orgCode matchgroup=orgCodeDelimiter start="[^ \t\k]\@