Dialog in vim

Has anyone written a vim syntax file for dialog? I don’t want to reduplicate the effort if someone else has got there first.


This is an EXCELLENT question. I’ve been toying with the idea of making a syntax file for nano for a while.

Here is my first attempt. I’m sure it’s not perfect but I can’t see anything glaringly wrong when I apply it to the standard library. https://www.vim.org/scripts/script.php?script_id=6032


Thank you @Ptolom! I’ve been a lurker for a while but finally made an account so I could thank you for this! I was on a similar hunt this morning for a syntax file for Vim and found yours ready-made. Cheers.

Here’s a quick Vim tip that someone might find useful. I was having some trouble figuring out a good way to navigate lengthy Dialog files in Vim – I’m not big on folding, and setting marks can get unwieldy depending on the number of locations that I’m working with. I ended up putting to use an existing plugin I use for Markdown editing and navigation: VOoM - Vim Outliner of Markups.

VOoM reads a buffer and creates a navigation pane on the left-hand side, and because the Dialog notation for objects (luckily) matches the Markdown H1 tag specification, calling :Voom markdown will provide a decent navigation panel for your story. In addition to navigation of your document, the VOoM commands can be quite powerful for the editing of your content as well. There are some improvements that could be made for Dialog files as well, if I have the time to take a look.

Screenshot of my Vim with Linus’s port of Cloak of Darkness loaded with VOoM:

I setup a quick command to load the VOoM panel on-demand with <leader>n

function EnableVOoM()
  Voom markdown

command VOoM call EnableVOoM()
nnoremap <leader>n :VOoM<CR>
1 Like