-
-
Save brainary/a5792467e931e4466fdb79b8b18486ae to your computer and use it in GitHub Desktop.
First attempt of syntax-highlighting of [x]it! on Nano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax "xit" "\.xit$" | |
tabgives " " | |
## Not matched - Errors | |
color ,red "^.*$" | |
## Headlines | |
# Version 5+ | |
color bold,normal "^[a-zA-Z0-9][a-zA-Z0-9 ]*$" | |
# Version 4 | |
#color normal "^[a-zA-Z0-9][a-zA-Z0-9 ]*$" | |
## Description | |
# Active | |
color normal start="^\[ \] .*$" end="(^\[(x|@|~)\]|^$)" | |
# Done | |
color brightblack start="^\[x\] .*$" end="(^\[( |@|~)\]|^$)" | |
# Ongoing | |
color normal start="^\[@\] .*$" end="(^\[( |x|~)\]|^$)" | |
# Obsolete | |
color brightblack start="^\[~\] .*$" end="(^\[( |x|@)\]|^$)" | |
## Priorities | |
color red "^\[( |x|@|~)\] (!*\.*|\.*!*) " | |
## Checkboxes | |
# Active | |
color brightcyan "^\[ \] " | |
# Done | |
color brightgreen "^\[x\] " | |
# Ongoing | |
color brightmagenta "^\[@\] " | |
# Obsolete | |
color brightblack "^\[~\] " | |
## Due Dates | |
color brightyellow "-> [0-9]{4}((-|/)(W[0-9]+|Q[0-9]|[0-9]{2}((-|/)([0-9]{2}))?))?" | |
## Tags | |
color cyan "#[A-Za-z0-9]+" | |
color cyan "#[A-Za-z0-9]+=[A-Za-z0-9]+" | |
color cyan "#[A-Za-z0-9]+=\"[^\"]+\"" | |
color cyan "#[A-Za-z0-9]+='[^']+'" | |
## Errors Override | |
color ,red "^[ ]{1,3}[^ ]*$" |
@brainary You may want to consider doing a pull request and adding this to the https://github.com/scopatz/nanorc repository? It would be a great addition to it.
Thank you for creating this!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reference, the original discussion.