Kappa-Dev / KappaTools

Tool suite for kappa models. Documentation and binaries can be found in the release section. Try it online at
http://kappalanguage.org/
GNU Lesser General Public License v3.0
113 stars 41 forks source link

vim editor support #588

Open nilsbecker opened 5 years ago

nilsbecker commented 5 years ago

it would be nice to have a vim filetype for .ka files with basic syntax highlighting.

pirbo commented 5 years ago

I neither agree nor disagree :-)

Syntax highlighting modes are a nightmare for maintenance. Everybody has its own format. We have so far: 1 for CodeMirror (the online UI) 1 for listing (LaTex) 1 for pygments (Latex and html outputs if I understood correctly) 1 (outdated still in syntax v3!) for emacs 1 (probably not up to date too) for notepad++ Someone started 1 for vscode

I have requests for 1 in atom 1 in BBEdit and you're not the first one about vim!

So, sorry, but my strategy on this is "do it yourself, I'll be happy to integrate it in the codebase if you've done a clean job but be aware that you'll stay responsible for it and if Kappa changes in a way that breaks your mode, if you don't update it, I won't and I'll ultimately remove the mode!"

This is violent but days only have 24 hours...

hmedina commented 5 years ago

For your point # 1: Pygments highlights kappa files and can produce HTML and TeX. But wait, there's more! You can have BBCode output, you can have RTF, terminal-like, even IRC output! Did you say you want images? You get PNG output! You get SVG output!

For your other point # 1: I have a Notepad++ file up to date; where should I deposit it? Where should I link to it? The blurb on the KappaLanguage website doesn't have a link (broken or otherwise), so I don't even know where the outdated one would be :s

For the other other point # 1: The CodeMirror's functionality is contained in the Pygments one, right? With your blessing, I can update the CodeMirror with the work I did for the Pygments one (and maybe a script to generate automagically the Pygments one from the CodeMirror one; thus we remove "yet another thing to maintain" and converge to just maintaining the CodeMirror one).

nilsbecker commented 5 years ago

i agree that it's definitely a burden and find the choice to leave that to users reasonable. that said, it's interesting that there is a mode for notepad++ but not for the one and only true text editor ;)