Skip to content

Commit

Permalink
Merge pull request #11 from ryanolsonx/3-priorities-should-work-with-…
Browse files Browse the repository at this point in the history
…padding-at-the-front

Allow padding in front of priorities
  • Loading branch information
ryanolsonx authored Apr 11, 2022
2 parents e27fd37 + df3fb2f commit 36fac3b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions syntax/xit.vim
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ syn match xitTitle "\v^[^\[| ].*$"
" Matches a checkbox like "[ ]"
syn match xitCheckboxOpen "\v^\[ \]" nextgroup=xitCheckboxOpenSpace
syn match xitCheckboxOpenSpace " " nextgroup=xitCheckboxOpenPriority contained
" Matches a priority. Periods followed by exclaimation followed by a space. If it doesn't
" Matches a priority. Spaces followed by periods followed by exclaimation followed by a space. If it doesn't
" match, it continues on to the description for the checkbox.
syn match xitCheckboxOpenPriority "\v(\.*!* ){,1}" nextgroup=xitCheckboxOpenDesc contained
syn match xitCheckboxOpenPriority "\v( *\.*!* ){,1}" nextgroup=xitCheckboxOpenDesc contained
" This matches a multiline open checkbox description. It starts right away with any char and ends
" at the beginning of the next checkbox or next group title. /me=e-1 means match to the end offset
" by one so that it doesn't include the first char of a title or the "[".
Expand All @@ -41,9 +41,9 @@ syn region xitCheckboxOpenDesc start="." end=/\v(\[|^[a-zA-Z0-9])/me=e-1 contain
" Matches a checkbox like "[x]"
syn match xitCheckboxChecked "\v^\[x\]" nextgroup=xitCheckboxCheckedSpace
syn match xitCheckboxCheckedSpace " " nextgroup=xitCheckboxCheckedPriority contained
" Matches a priority. Periods followed by exclaimation followed by a space. If it doesn't
" Matches a priority. Spaces followed by periods followed by exclaimation followed by a space. If it doesn't
" match, it continues on to the description for the checkbox.
syn match xitCheckboxCheckedPriority "\v(\.*!* ){,1}" nextgroup=xitCheckboxCheckedDesc contained
syn match xitCheckboxCheckedPriority "\v( *\.*!* ){,1}" nextgroup=xitCheckboxCheckedDesc contained
" This matches a multiline checked checkbox description. It starts right away with any char and ends
" at the beginning of the next checkbox or next group title. /me=e-1 means match to the end offset
" by one so that it doesn't include the first char of a title or the "[".
Expand All @@ -52,9 +52,9 @@ syn region xitCheckboxCheckedDesc start="." end=/\v(\[|^[a-zA-Z0-9])/me=e-1 cont
" Matches a checkbox like "[@]"
syn match xitCheckboxOngoing "\v^\[\@\]" nextgroup=xitCheckboxOngoingSpace
syn match xitCheckboxOngoingSpace " " nextgroup=xitCheckboxOngoingPriority contained
" Matches a priority. Periods followed by exclaimation followed by a space. If it doesn't
" Matches a priority. Spaces followed by periods followed by exclaimation followed by a space. If it doesn't
" match, it continues on to the description for the checkbox.
syn match xitCheckboxOngoingPriority "\v(\.*!* ){,1}" nextgroup=xitCheckboxOngoingDesc contained
syn match xitCheckboxOngoingPriority "\v( *\.*!* ){,1}" nextgroup=xitCheckboxOngoingDesc contained
" This matches a multiline ongoing checkbox description. It starts right away with any char and ends
" at the beginning of the next checkbox or next group title. /me=e-1 means match to the end offset
" by one so that it doesn't include the first char of a title or the "[".
Expand All @@ -63,9 +63,9 @@ syn region xitCheckboxOngoingDesc start="." end=/\v(\[|^[a-zA-Z0-9])/me=e-1 cont
" This matches a checkbox like "[~]"
syn match xitCheckboxObsolete "\v^\[\~\]" nextgroup=xitCheckboxObsoleteSpace
syn match xitCheckboxObsoleteSpace " " nextgroup=xitCheckboxObsoletePriority contained
" Matches a priority. Periods followed by exclaimation followed by a space. If it doesn't
" Matches a priority. Spaces followed by periods followed by exclaimation followed by a space. If it doesn't
" match, it continues on to the description for the checkbox.
syn match xitCheckboxObsoletePriority "\v(\.*!* ){,1}" nextgroup=xitCheckboxObsoleteDesc contained
syn match xitCheckboxObsoletePriority "\v( *\.*!* ){,1}" nextgroup=xitCheckboxObsoleteDesc contained
" This matches a multiline obsolete checkbox description. It starts right away with any char and ends
" at the beginning of the next checkbox or next group title. /me=e-1 means match to the end offset
" by one so that it doesn't include the first char of a title or the "[".
Expand Down

0 comments on commit 36fac3b

Please sign in to comment.