Org Syntax highlighting

Has anyone written an org-mode syntax highlighting yet? There were a few forum posts about this a while ago but I don’t see anything in the directory.

If not I will try writing one myself.

Update: here is a first attempt: Org | Drafts Directory

2 Likes

Nice start, thanks for posting it. I started to make a demo version a couple of times, but know so little about org-mode I didn’t think I was capturing what a user would care about.

1 Like

Thanks. I’ll try and add the rest today.

edit: added some more

This is great! I only just started trying Drafts again because of the custom syntax options and wiki link autocomplete. Because I wanted to set Org as default and still have the autocomplete from the built-in Markdown syntax, I added this to it on my machine:

"autocompleteDefinitions": [
  {
    "trigger": "[[",
    "type": "draft",
    "label": "[[display_title]]",
    "value": "[[display_title]]",
    "queryType": "title",
    "queryTagFilter": "",
    "prefix": "[[",
    "suffix": "]]",
    "enabled": true
  },
  {
    "trigger": "<<",
    "type": "draft",
    "label": "[[display_title]]",
    "value": "[[draft]]",
    "queryType": "title",
    "queryTagFilter": "",
    "prefix": "",
    "suffix": "",
    "enabled": true
  }
]

Between this and the existing link shortcut syntax, e.g. [[wikipedia:Mathematics]], this handles much of what I missed from Emacs when using other note taking applications.

2 Likes