The Gram Code Editor - 2026-10-10


  1. ashleytg

    is it okay to suggest an idea here? :3

  2. ashleytg

    or should i only do that on codeberg?

  3. mort

    Go ahead

  4. emilinya

    Turns out the async situation is trickier than I thought, zed does not use smol as its primary runtime, it actually comes with its own custom runtime, described in a blogpost: https://zed.dev/blog/zed-decoded-async-rust Messing with that runtime is probably a bad idea, maybe it would instead be possible to remove tokio instead

  5. ashleytg

    > Go ahead yay!

  6. ashleytg

    okay so

  7. ashleytg

    a TUI version of Gram!

  8. ashleytg

    could do like

  9. ashleytg

    gram . --tui

  10. ashleytg

    or something like that!

  11. ashleytg

    it would make the editor more accessible, and i've already been working on a TUI based Rust text editor :3

  12. ashleytg

    that could be used as a base!

  13. ashleytg

    it would require at least a month, probably more of reviewing code, before it's ever added-

  14. ashleytg

    plus, the number of people that use TUIs is growing!

  15. ashleytg

    some people don't even touch GUI :3

  16. mort

    My hunch is that a TUI text editor and a proper GUI text editor (i.e not something like GVim which is a TUI in a window) are so fundamentally different that it would pretty much be a complete rewrite to make it a TUI. A lot of Gram is built around gpui. But if you think there are useful bits and pieces in Gram, feel free to fork it and use it as a base, it's open source

  17. michalr

    I have a smaller idea: so, I'm a long time Sublime Text user, and it has a "jump to anywhere" functionality. Basically, like there's a fuzzy file picker in Gram already, symbol picker and so on, it's similar but combined into one. So how it works is that in the fuzzy file picker if you prepend your searched text with '@' then it search in symbols in current file, if you prepend it with ':' then it jumps to line number and so on. All this functionality already is in Gram, but I find Sublime's approach more approachable than having different shortcuts for those. I'd love to make a patch myself but I don't know when I'll get around to it and if I'll even manage to do it heh ✎

  18. michalr

    I have a smaller idea: so, I'm a long time Sublime Text user, and it has a "jump to anywhere" functionality. Basically, like there's a fuzzy file picker in Gram already, symbol picker and so on, it's similar but combined into one. So how it works is that in the fuzzy file picker if you prepend your searched text with '@' then it searches in symbols in current file, if you prepend it with ':' then it jumps to line number and so on. All this functionality already is in Gram, but I find Sublime's approach more approachable than having different shortcuts for those. I'd love to make a patch myself but I don't know when I'll get around to it and if I'll even manage to do it heh ✏

  19. michalr

    I have a smaller idea: so, I'm a long time Sublime Text user, and it has a "jump to anywhere" functionality. Basically, like there's a fuzzy file picker in Gram already, symbol picker and so on, it's similar but combined into one. So how it works is that in the fuzzy file picker if you prepend your searched text with '@' then it searches in symbols in current file, if you prepend it with ':' then it jumps to line number and so on. All this functionality already is in Gram, but I find Sublime's approach more intuitive than having different shortcuts for those. I'd love to make a patch myself but I don't know when I'll get around to it and if I'll even manage to do it heh ✏

  20. ashleytg

    > My hunch is that a TUI text editor and a proper GUI text editor (i.e not something like GVim which is a TUI in a window) are so fundamentally different that it would pretty much be a complete rewrite to make it a TUI. A lot of Gram is built around gpui. But if you think there are useful bits and pieces in Gram, feel free to fork it and use it as a base, it's open source okay! that makes sense! i'm probably gonna stop taking design ideas from VSCode, and instead from Gram!

  21. mort

    Today at 15:03: > Turns out the async situation is trickier than I thought, zed does not use smol as its primary runtime, it actually comes with its own custom runtime, described in a blogpost: https://zed.dev/blog/zed-decoded-async-rust > > Messing with that runtime is probably a bad idea, maybe it would instead be possible to remove tokio instead I experimented with replacing async-tar altogether with an async wrapper around another tar crate and it turned out to be relatively straightforward: https://codeberg.org/xmort/gram/commit/70819fde3fccaaf90ffa41071683437b34620e65 And getting rid of async-std in jupyter-zmq-client turned out to be trivial so I submitted a PR to them: https://github.com/runtimed/runtimed/pull/325. Worst case it doesn't seem like a very busy project so it could make sense for Gram to carry a fork with that patch. With that change, we could go back to the async-dispatcher runtime while still being rid of async-std. So we can go down to "only" 2 runtimes for almost everything; Zed's async dispatcher runtime for most of gpui, and smol for all the ad-hoc block_on calls. The only remaining use of tokio would be for running webassembly. async-std would remain gone. In retrospect I think moving tar and jupyter to tokio might've been the wrong choice; it seemed so straightforward when I assumed that "we depend on tokio so Gram is probably just a normal tokio rust code base" hehe ✎

  22. mort

    Today at 15:03: > Turns out the async situation is trickier than I thought, zed does not use smol as its primary runtime, it actually comes with its own custom runtime, described in a blogpost: https://zed.dev/blog/zed-decoded-async-rust > > Messing with that runtime is probably a bad idea, maybe it would instead be possible to remove tokio instead I experimented with replacing async-tar altogether with an async wrapper around another tar crate and it turned out to be relatively straightforward: https://codeberg.org/xmort/gram/commit/70819fde3fccaaf90ffa41071683437b34620e65 And getting rid of async-std in jupyter-zmq-client turned out to be trivial so I submitted a PR to them: https://github.com/runtimed/runtimed/pull/325. Worst case it doesn't seem like a very busy project so it could make sense for Gram to carry a fork with that patch. With that change, we could go back to the async-dispatcher runtime while still being rid of async-std. So we can go down to "only" 2 runtimes for almost everything; Zed's async dispatcher runtime for most of gpui, and smol for all the ad-hoc block_on calls. The only remaining use of tokio would be for running webassembly. async-std would remain gone. In retrospect I think moving tar and jupyter to tokio might've been the wrong choice; it seemed so straightforwardly correct when I assumed that "we depend on tokio so Gram is probably just a normal tokio rust code base" hehe ✏

  23. mort

    Today at 15:03: > Turns out the async situation is trickier than I thought, zed does not use smol as its primary runtime, it actually comes with its own custom runtime, described in a blogpost: https://zed.dev/blog/zed-decoded-async-rust > > Messing with that runtime is probably a bad idea, maybe it would instead be possible to remove tokio instead I experimented with replacing async-tar altogether with an async wrapper around another tar crate and it turned out to be relatively straightforward: https://codeberg.org/xmort/gram/commit/70819fde3fccaaf90ffa41071683437b34620e65 And getting rid of async-std in jupyter-zmq-client turned out to be trivial so I submitted a PR to them: https://github.com/runtimed/runtimed/pull/325. Worst case it doesn't seem like a very busy project so it could make sense for Gram to carry a fork with that patch. With that change, we could go back to the async-dispatcher runtime while still being rid of async-std. So we can go down to "only" 2 runtimes for almost everything; Zed's async dispatcher runtime for top level gpui stuff, and smol for all the ad-hoc block_on calls. The only remaining use of tokio would be for running webassembly. async-std would remain gone. In retrospect I think moving tar and jupyter to tokio might've been the wrong choice; it seemed so straightforwardly correct when I assumed that "we depend on tokio so Gram is probably just a normal tokio rust code base" hehe ✏

  24. Nano

    Hi there, I’m currently doing some work on Windows and I’m still baby-stepping linux-only Emacs. I want to invest myself in the current humane software train and I wanted to know if Gram had some low hanging fruits for someone like me who is used to low level stuff but not yet fully involved in rust

  25. Nano

    whoops forgot the "im looking for a code editor"

  26. ashleytg

    hmmm

  27. ashleytg

    i think @krig, @nicoco, or @mort might be able to help?

  28. ashleytg

    they're usually talking about development more than me-

  29. nicoco

    I made a few very minor contribs, I am not the right person to ask what the priorities are. Pick a small bug you'd want to see fixed, Nano, maybe?