r/typst • u/FortranMan2718 • 5d ago
Yet Another Vibe Coded Editor
So, like many readers here, I find myself tiring of the endless "I did the thing" posts about creating a new editor. Often these editors implement already available features, or the author is evasive about their use of AI. I though I would share my experience that has recently resulted in the creation of another Typst editor.
I teach engineering at a public university, and our legal team has decided that all course documents must pass all the accessibility standards due to changes in the interpretation of the ADA. I don't want this discussion to dwell on this, but the reality is that I am obligated to make all my class documents compliant. At the time I was working in LaTeX (not directly; we'll get back to that), and realized that I had a pretty big problem on my hands. After taking inventory of all the packages I used at the time, I realized that it would be easier to move my documents from LaTeX to Typst for compliance than to start over on the formatting. Typst itself has been wonderful, and I continue to enjoy it as a document building tool.
Editing the documents in the Kate editor with Tinymist as the LSP has been good. No major complaints. I've managed to get my files converted and fully compliant (at least to the standards I'm held to). Only recently, I found myself creating a large new file instead of converting existing documents. It was at this point that I started to wish for LyX again. It makes writing LaTeX much more like writing than coding, and for this task I prefer that interface. It is not a word processor, nor is it a code editor. LyX is something else, and I felt its absence sorely.
Enter the AI... As an engineering instructor, I'm expected to teach my students how to use AI (really just LLMs and other generative AI tools) both responsibly and productively. Since it wasn't exactly part of my education, I need to gain experience. I also have a school account with OpenAI to use ChatGPT (and Copilot too, but I have found it far less useful). My request started simply enough: build an editor based on the text widget from Tkinter in Python to directly edit Typst files. After that, I incrementally guided the creation of a tool that is legitimately useful to me. The LLM is really dumb, and I have repeatedly been forced to take a direct guidance role with it in development. The alternative is no specialized editor, since I certainly don't have time to do this myself, even if I do have the knowledge and programming skills.
I have no plans to share this editor. There is no github page. I don't expect this to be used by more than myself and one other colleague, and that is actually the most interesting aspect of this whole experience to me. Is the code good? I don't think so. Does it work well enough to be useful to me and speed up my work? Absolutely.
As it stands, TyX is a pretty useful and limited LyX clone for Typst. Unlike LyX, TyX uses raw Typst code, since I always thought LyX was a little too distinct from the LaTeX engine it used. It can edit files and partially render the interesting bits (figures, tables, equations, and any command you put in a list). I don't expect to convince anybody. I pretty sure the only thing I want out of this is to start a discussion on an interesting experience I've had.
4
u/iam-abdullah-al-azmi 5d ago
looks fantastic and amazing! the gui looks pretty to me due to its neatness and cleanliness.
5
u/FortranMan2718 5d ago
It's probably just my age showing, but I really miss the simple, organized interfaces from the early 2000s. I usually use rather retro themes on my computer, and like recognizing the widgets by look and not wondering if things are hiding until I move the mouse in some way.
6
u/MoreDimension5963 4d ago
Is the code good? I don't think so. Does it work well enough to be useful to me and speed up my work? Absolutely.
Man as a CS student I've made so many little personal programs where I'd be utterly embarrassed if any of my classmates there to peek at the code, yet they are just genuinely useful.
5
1
u/krtekz 5d ago
Can you share it?
1
u/Johannes_K_Rexx 5d ago
> have no plans to share this editor. There is no github page.
Too bad really. u/FortranMan2718 be announcing "Yo I built this, yay me" and refusing to share the work. In the same post. Come along now, post the code and redeem yourself.
3
u/FortranMan2718 4d ago
I think you may be missing the point I tried to make. The code itself is not that valuable. The only really interesting points here are (1) we can make personalized tools with only a small time cost to ourselves, and (2) the LyX ideology in an editor remains interesting.
If there turns out to be broad interest I would share a link to the current version, but for the same reasons that I cannot make my own tools I certainly cannot manage a project used by others.
1
u/cgosorio73 4d ago
Like u/krtekz, I'd also be interested in seeing this project shared. Of course, it's entirely your call, and you don't owe anyone anything. Just keep in mind that putting it on GitHub doesn't commit you to maintaining it. A short note in the README along the lines of "personal project, shared as-is, no support or maintenance promised, PRs/issues may go unanswered" sets expectations perfectly. Plenty of useful tools live that way, and people who want to build on it can simply fork it. Either way, thanks for sharing the story!
1
u/FortranMan2718 3d ago
I guess I'll look into hosting it on github then. There are a few things I'm still resolving before I'll post it. I have GPT working on a version of LyX import to help me migrate more of my old course files that I haven't completed yet. I'll make another post when things are ready for sharing.
1
u/Silly-Freak 5d ago
It's one thing to be interested in the editor, but saying OP should to "redeem" themselves is kinda missing the point entirely.




11
u/Silly-Freak 5d ago
This reminds me of one of my classes where we learned Smalltalk, and the professor told us about how a part of the Smalltalk philosophy was "personal computing", as in, you can tinker with the system and tweaking the running applications to your personal needs is intended.
AI generated code, unless you put a whole lot of energy into making it maintainable both as a codebase and an ongoing project, is more for personal use. Maybe once the hype has ebbed more people will simply use the tools they create themselves instead of expecting others will want exactly the same tools as they want.
(Not saying that this is ideal in terms of energy usage and overall expenditure of effort, but it has merit in the same way as the Smalltalk version of personal computing had)