I’ve added some new features to the vi syntax file. I found a few more Choicescript commands that weren’t included, such as *check_achievements, so I’ve included them and reorganized the existing groupings a bit.
I also added support for bold, italic, and bold + italic text. Now when you use Choicescript’s [b][/b] and [i][/i] commands, vim will show the text as bold, italic, or both. Variables inside the formatting tags are still marked in the same color used in the rest of the document.
For example, I made an indent file that seems to work, got folds to work, auto-detect the choicescript filetype, and auto-load some new vim commands that help when coding in choicescript.
I didn’t think choicescripters were using vim, so I was waiting until I learned how to package this as a plugin and make an easy-vim version. However, now that I know I’m not the only vim-choicescripter, I might as well put this out there now. Let me know what you think!
Please do! And see if you can figure out how to fix it. For example, *fake_choices don’t do the indent right. I think *choice only does if there’s a *goto, etc. It works well enough, though, so I haven’t bothered looking into these things further.
@TracyCanfield I see you have updated your syntax file since I’ve been here last. Nice! I’m trying it out now, comparing it to mine. I didn’t see my folds code in it, so I’m going to see if it will still work in yours.
Anyway, I just stopped by, cuz I think this is the main Choicescript/Vim thread, and I wanted to announce that I added Ctags support for Choicescript in vim, which enables jumping to where variables, labels, and achievements are created and even a sidebar with all of them, sorted and categorized to refer to and/or jump to.
Well, my fold code breaks some things when added to your syntax file (e.g. bolditalics and italicsbold), so I added (stole ) all the stuff you had that I didn’t, plus fixed some bugs in yours. (Basically, #, true, false, and parentheses in regular text are still highlighted.) So now mine does everything yours does (but the colors might be different), with bug fixes, and folding.