jgm / djot

A light markup language
https://djot.net
MIT License
1.67k stars 43 forks source link

Vim highlighted text and autolinks #81

Closed krontzo closed 1 year ago

krontzo commented 1 year ago

A pair of fixes for the vim syntax.

djot-vim

Current (left) vs Proposed (right)

  1. Extra symbol ($) in highlighted text end delimiter. (See line 5)
  2. Autolinks are not highlighted. (See line 9 vs line 11)

Proposed fixes:

24c24
< syn region highlight matchgroup=delimiter start='{=' end='=}$\|^\s*$' contains=@inline
---
> syn region highlight matchgroup=delimiter start='{=' end='=}\|^\s*$' contains=@inline
46a47,48
> syn region djotUrl matchgroup=delimiter start=/</ end=/>/
> 
67a70
> hi def link djotUrl Underlined
jgm commented 1 year ago

Great. Want to submit a PR, or should I just paste these in?

krontzo commented 1 year ago

I'll submit a PR.