Hacker News new | ask | show | jobs
by smokel 31 days ago
Interesting. I recently "vibe-coded" my personal Obsidian clone, because I want proper Emacs keybindings, and Obsidian does not support those, not even through extensions.

I do not know what to do with my pet project. I'm using it myself, and it has tons of futures that took quite some effort to get right. For example, WYSIWYG table editing is not trivial, and Claude Opus agrees with me, in the sense that it could not manage it (at all) by itself.

Open-sourcing it is an option, but I don't look forward to negative feedback. If anyone else wants Emacs keybindings in Obsidian, I will change my mind :)

1 comments

I too have vibe-coded my own personal obsidian/sublime replacement in rust, and also ran into WYSIWYG table editing and rendering issues with opus 4.7. Took a couple iterations but now formulas/rendering are perfect. GPT5.5 actually handled that very well compared to 4.7
I would love to hear more about this, did you use a GUI library? Does it perform well?
Not the one you're replying to, but "my" system is an Angular application that makes heavy use of CodeMirror.

One instance for the base editor, and one instance for the currently active cell. The other cells are rendered to HTML through a different code path (no CodeMirror involved there).

For rendering mathematical formulas it uses MathJax.

A global context-based keyboard handler such as the one in VSCode allows for Emacs key bindings.

I've vibe coded a codemirror table editor (as a plugin for joplin) using a nested codemirror instance for the cell editor, in my case using joplin's built in command to render markup for the inactive cells: https://github.com/bwat47/joplin-rich-tables

it works well but I'm not much of a programmer and probably ended up with a crazy over engineered architecture lol

I was surprised that there weren't any existing libraries for this (there is one now but it was created after I started work on my plugin: https://github.com/ckant/codemirror-markdown-tables)

Sure! At first I wanted a sublime that played nice on windows with virtual desktops (it has some annoyances when dragging tabs, they dont respect separate destkops). I use sublime as my 'ephemeral' text editor, and Obsidian for my actual saved/persisted notes, but i love Obsidian's WYSIWYG markdown experience so i wanted to bake that into this as well.

So the core ethos of it is: 1. ephemeral AND safe - easy to jot notes but also safe from crash or accidental closing ( all text buffers persist a rewindable history), 2. performance, 3. minimalism: I don't want a whole plugin ecosystem or bloat. extra features are all accessed via the command palette, 4. markdown WYSIWYG rendering tailored to my liking

Technical details: Native markdown notes editor for Windows, written in Rust. No GUI library as I went straight to raw Win32 with DirectWrite/Direct2D/D3D11 underneath. No winit, no wgpu, no async. Just a real wndproc and threads talking over crossbeam channels. The rope is canonical and there's a separate "display map" layer that handles wrapping, folding, hide/replace projections.

source bytes never touch the GPU and every text layout is built from a display string with styles baked in. SQLite is the source of truth and the files on disk are exports, so every keystroke is durable

Performance is the whole point as I wanted sublime-level performance(and beyond) There are gated budgets in CI for every slice, eg. keystroke to pixel under 8ms p99, decoration parse under 1ms, D2D submission under 2ms, edit-to-durable under 400ms, plus a variance-tail contract (p99.9 ≤ 2× p99) so sporadic stalls fail the build too. Steady-state target is zero new heap allocations per keystroke. Layout caches are keyed so they survive typing bursts, the display map has splice + motion-reuse caches that killed O(document) rebuilds on single-character edits and caret moves, and every reflow funnels through a helper that pins the caret's screen-y so font/wrap/resize changes never make you re-find your cursor.

I've also done a bit of research on the psychology of perception and response times to try to tune this for maximum intuitiveness and responsiveness. Too fast is disconcerting, too slow is infuriating, too little feedback is confusing, too much is distractinc, etc.

this has taken about a week so far and it's almost ready to replace my usage of sublime