robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
c7a9404019
master
1" Vim syntax file 2" Language: Org 3" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com> 4" Maintainer: This runtime file is looking for a new maintainer. 5" Last Change: 2025 Aug 05 6" 7" Reference Specification: Org mode manual 8" GNU Info: `$ info Org` 9" Web: <https://orgmode.org/manual/index.html> 10 11" Quit when a (custom) syntax file was already loaded 12if exists ( "b:current_syntax" ) 13finish 14endif 15let b: current_syntax = 'org' 16 17syn case ignore 18 19" Bold 20syn region orgBold matchgroup = orgBoldDelimiter start = "\(^\| [ - '"({\] ] \)\@<=\*\ze [ ^ ] "end = "^\@!\*\( [ ^\k\* ] \|$\)\@= "keepend 21hi def link orgBold markdownBold 22hi def link orgBoldDelimiter orgBold 23 24" Italic 25syn region orgItalic matchgroup = orgItalicDelimiter start = "\(^\| [ - '"({\] ] \)\@<=\/\ze [ ^ ] "end = "^\@!\/\( [ ^\k\/ ] \|$\)\@= "keepend 26hi def link orgItalic markdownItalic 27hi def link orgItalicDelimiter orgItalic 28 29" Strikethrogh 30syn region orgStrikethrough matchgroup = orgStrikethroughDelimiter start = "\(^\| [ '"({\] ] \)\@<=+\ze [ ^ ] "end = "^\@!+\( [ ^\k+ ] \|$\)\@= "keepend 31hi def link orgStrikethrough markdownStrike 32hi def link orgStrikethroughDelimiter orgStrikethrough 33 34" Underline 35syn region orgUnderline matchgroup = orgUnderlineDelimiter start = "\(^\| [ - '"({\] ] \)\@<=_\ze [ ^ ] "end = "^\@!_\( [ ^\k_ ] \|$\)\@= "keepend 36 37" Headlines 38syn match orgHeadline "^\*\+\s\+. * $ "keepend 39hi def link orgHeadline Title 40 41" Line Comment 42syn match orgLineComment /^\s * #\s\+. * $ /keepend 43hi def link orgLineComment Comment 44 45" Block Comment 46syn region orgBlockComment matchgroup = orgBlockCommentDelimiter start = "\c^\s * #+BEGIN_COMMENT "end = "\c^\s * #+END_COMMENT "keepend 47hi def link orgBlockComment Comment 48hi def link orgBlockCommentDelimiter Comment 49 50" Lists 51syn match orgUnorderedListMarker "^\s * [ -+ ] \s\+ "keepend 52hi def link orgUnorderedListMarker markdownOrderedListMarker 53syn match orgOrderedListMarker "^\s * \(\d\|\a\)\+ [ .) ] \s\+ "keepend 54hi def link orgOrderedListMarker markdownOrderedListMarker 55" 56" Verbatim 57syn region orgVerbatimInline matchgroup = orgVerbatimInlineDelimiter start = "\(^\| [ - '"({\] ] \)\@<==\ze [ ^ ] "end = "^\@!=\( [ ^\k= ] \|$\)\@= "keepend 58hi def link orgVerbatimInline markdownCodeBlock 59hi def link orgVerbatimInlineDelimiter orgVerbatimInline 60syn region orgVerbatimBlock matchgroup = orgVerbatimBlockDelimiter start = "\c^\s * #+BEGIN_. * "end = "\c^\s * #+END_. * "keepend 61hi def link orgVerbatimBlock orgCode 62hi def link orgVerbatimBlockDelimiter orgVerbatimBlock 63 64" Code 65syn region orgCodeInline matchgroup = orgCodeInlineDelimiter start = "\(^\| [ - '"({\] ] \)\@<=\~\ze [ ^ ] "end = "^\@!\~\( [ ^\k\~ ] \|$\)\@= "keepend 66highlight def link orgCodeInline markdownCodeBlock 67highlight def link orgCodeInlineDelimiter orgCodeInline 68syn region orgCodeBlock matchgroup = orgCodeBlockDelimiter start = "\c^\s * #+BEGIN_SRC. * "end = "\c^\s * #+END_SRC "keepend 69highlight def link orgCodeBlock markdownCodeBlock 70highlight def link orgCodeBlockDelimiter orgCodeBlock 71 72" vim: ts=8 sts=2 sw=2 et