Txt: A fast, keyboard-driven terminal text editor for engineers

(txt.hellman.io)

41 points | by jlundberg 3 days ago ago

18 comments

  • __fst__ 2 days ago ago

    Since going through the hassle of learning vim I can't use anything else anymore.

    And for the use case of "I built txt because I spend most of my time in the terminal, and switching to a different tool just to make a quick edit always felt like friction I did not want. The editors that live in the terminal either have steep learning curves built around modal paradigms, or they are too limited to be genuinely useful."

    it's literally only a handful of vim commands and shortcuts you need.

    • sublinear 2 days ago ago

      It's a shame that it ever felt like a hassle.

      We should be introducing people to vim long before they are learning it under pressure. As you say, it's really not a lot to remember.

    • haberman 2 days ago ago

      Vim is great and I have 25 years of muscle memory for it. But I'm also interested in trying Kakoune (https://kakoune.org/why-kakoune/why-kakoune.html) -- which I understand also has a VSCode plugin called Dance (https://github.com/71/dance) -- as I've seen somewhat convincing arguments that it is a more powerful model for modal editing.

      Instead of "verb object" (eg. delete word or "dw"), it is "object verb" (eg. word delete, or "wd").

      In particular, it seems to obsolete "visual mode" from vim (which I use often), because you're essentially always in visual mode. You always get to see a selection before you perform an action. Or at least that's what I understand, I haven't tried it yet.

      • atiedebee 2 days ago ago

        I've been using kakoune for the past 2-3 years and it has been great. My main reason for switching from vim was the adherence to the Unix philosophy, but the editing model has been great. Seeing your selections change after each command + the clippy help text when entering a different "mode"^1 has made learning different editing patterns very easy. The only thing I really miss from vim is the number increment/decrement shortcut. There is a plugin for it, but I haven't tried it out yet (incrementing each selection by a different amount hasn't come up often enough for me).

        ^1: kakoune doesn't have multi character shortcuts. You create a "mode" which works basically like a namespace for keystrokes (https://igor-ramazanov.github.io/doc/pages/modes.html).

    • iLemming a day ago ago

      vim is not a single concrete editor - it's rather an abstract idea, and ideas do port (if done properly). But some substrates have poor foundation for porting, some have much more flexible base. Every vim plugin for major editors - VSCode, IntelliJ, Sublime, etc. have tons of deficiencies, partly because the platform itself might be prohibiting. In comparison, evil-mode in Emacs is absolutely great, in some cases it is even better than what Vim/Neovim have natively. And that's because of flexibility and malleability of the host platform.

    • Joker_vD 2 days ago ago

      > Since going through the hassle of learning vim I can't use anything else anymore.

      That sounds like an amazing investment, really makes me want to learn it too!

  • _ix 2 days ago ago

    While they play up the keyboard-driven functionality, they showcase a pointer-driven workflow in the demonstration gif. Curious choice, no?

  • WesolyKubeczek 2 days ago ago

    Since https://github.com/micro-editor/MICRO exists for some years now, a comparison would be welcome.

  • rckt 2 days ago ago

    I can understand startups relying on AI tools to test out the ideas. But personal/hobby projects? Feels weird. This is not the place to go fast. Take your time, enjoy the process, learn/make things.

  • sgarland 2 days ago ago

    > The editors that live in the terminal either have steep learning curves built around modal paradigms, or they are too limited to be genuinely useful.

    > txt is not trying to replace your main IDE. It is the editor you reach for when you just need to edit something

    These two are in conflict. If you just want to edit something, and don’t know [n]vi[m] or emacs, then use nano. If you want line numbers, code folding, syntax highlighting, etc. then it sounds like you should spend the time to learn a more powerful editor.

    Honestly, vi isn’t that hard to learn the absolute basics, and you should spend the 15 minutes to do so, because it’s practically guaranteed to be available everywhere. :wq and i are about all you need to “just edit something.”

    • iLemming a day ago ago

      I honestly don't get software engineers who don't know basic vim motions and don't even care to learn them. Seriously? They plan never to use `less` and `more`, they won't be reading manpages, they are okay with not knowing what `sed` can do?

      I get why people prefer not to use it actively - everyone has their own preference, but choosing to not to know it, at all? Knowing basics of vim for a programmer is like understanding basics of git. It is a must.

  • zero_shift 2 days ago ago

    I'm not going to criticise you for using Claude to build this. Honestly, for me as a consumer, it is a neutral thing provided the software is high quality

    What I would ask is this: why should I use your software when I could generate my own?

    For a relatively low cost in tokens, I could use Cursor & Fable 5.1 to generate a decent text editor of my own, if I constrained it to use high quality dependencies

    So this is kind of the real quandary of OSS development: is there really any point creating tools for developers any more?

    • testerius 2 days ago ago

      I think yes because there are people who prefer picking up something rather than building their tool. Recreating just everything from scratch or make custom solutions are not the one way to go. I do not want to create editor/IDE because it is not in my interests. I choose VS Code, Kate, Notepad++, Nano instead. If I have paid LLMs I will use them different way than reinventing editor lol.

      Also keep in mind that it is software which requires a little bit maintenance from time to time. And access to LLM (mostly paid) and (or - depends on if we want to understand something) domain knowledge (in this case how to build editor, how to do parsing etc.).

      However if somebody wants to do custom things then let him/her do it. And yeah first editor, then programming language, then... OS and so on.