Created
August 2, 2017 14:19
-
-
Save mpeuster/bce90e9365531e0e4ff3ceb366c6b4e8 to your computer and use it in GitHub Desktop.
Highlights headings, TODOs, checkboxes, and links in Emacs Orgmode files
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
{ | |
// GoCoEdit demo mode - visit http://gocoedit.com/docs/custommodes for more information | |
"name": "orgfile", // The name of the Mode | |
"ext":[ | |
// An Array of file extensions to associate with your mode | |
"org", "ORG", "Org", | |
], | |
"dash_docsets": "", // Docsets to search if you are using the dash app | |
"tokenizer":[ | |
// The logic in your mode. For more information see http://gocoedit.com/docs/custommodes | |
{ | |
"state":"start", | |
"parse":[ | |
// control sequences / fields | |
{ | |
"token":"comment", | |
"regex":"\\#\\+.*", | |
"onlyOnLineStart": true, | |
}, | |
// TODO keyword | |
{ | |
"token":"keyword", | |
"regex":"TODO", | |
}, | |
// heading + TODO | |
{ | |
"token":"keyword", | |
"regex":"\\*.*TODO.*", | |
"onlyOnLineStart": true, | |
}, | |
// heading-5 | |
{ | |
"token":"string-2", | |
"regex":"\\*\\*\\*\\*\\*.*", | |
"onlyOnLineStart": true, | |
}, | |
// heading-4 | |
{ | |
"token":"property", | |
"regex":"\\*\\*\\*\\*.*", | |
"onlyOnLineStart": true, | |
}, | |
// heading-3 | |
{ | |
"token":"atom", | |
"regex":"\\*\\*\\*.*", | |
"onlyOnLineStart": true, | |
}, | |
// heading-2 | |
{ | |
"token":"string", | |
"regex":"\\*\\*.*", | |
"onlyOnLineStart": true, | |
}, | |
// heading-1 | |
{ | |
"token":"string-2", | |
"regex":"\\*.*", | |
"onlyOnLineStart": true, | |
}, | |
// checkboxes: [ ] | |
{ | |
"token":"operator", | |
"regex":".*\\[.\\].*" | |
}, | |
// links [[][]] | |
{ | |
"token":"builtin", | |
"regex":"\\[\\[.*\\]\\[.*\\]\\]" | |
} | |
] | |
} | |
], | |
"hint": { | |
// Additional hints for the autocomplete function (global or for tokens) | |
}, | |
"symbol_search": { | |
// An array of regexes to find your symbols | |
"regex": [ | |
"TODO\\s{1,}\\w{1,}", | |
"DONE\\s{1,}\\w{1,}", | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment