Show HN: Tome, aka Tom's Editor – a new command-line text editor
github.com
github.com
Alternatively, if it's possible to emulate VSCode's keybindings in an existing editor, I'd be happy to go that route. I just don't know the space very well.
If you’re using iTerm, or Konsole, or Gnome Terminal, or urxvt, or… pretty much anything other than Kitty or WezTerm, you owe it to yourself to make the switch.
Personally, I use WezTerm.
Support for Windows, macOS and Linux. Better configuration. Better font rendering. Built-in fallback to Nerd Font for vscode-like icons in your editor of choice (I use neovim), so you don’t need to patch your font. Supports the Kitty keyboard protocol, and image display. Tons of features, too many to list here.
Features WezTerm has that Alacritty doesn't:
1) iTerm Image Protocol (inline image display)
2) Kitty Keyboard Protocol (allows for keybindings that otherwise wouldn't be possible)
3) Semantic prompts (e.g. you can configure a keybinding to navigate in your scrollback to the previous/next prompt)
4) Built-in SSH support. Creating new tabs or panes will each create a new channel in your existing session so you won't need to re-authenticate for additional tabs that you create.
5) Alternatively, you could use WezTerm's multiplexing support. Think tmux (remote sessions persist even when you disconnect, and reconnecting gives you all of the existing windows/tabs/panes again), but graphical and built into the terminal emulator.
6) Config is written in Lua, and you can use that for clever automation, new keybindings, custom formatting of window/tab titles, etc.
7) Multiple fonts can be specified, where glyph rendering will attempt to fallback to the other fonts when not found. Advanced font shaping configuration -- you could do things like enable/disable ligatures, enable font options (if the font supports it) for alternative styling, like having zeros render with a dot or slash (to differentiate from a capital letter 'O').
Those are just some of the things I could think of real quick. Definitely recommend skimming the WezTerm documentation site.
You could also take the pill and make 180 turn and put vim bindings on VSCode, lmao
I've been daily-driving my own little editor for many years now. I do like VSCode, and drop in on occasion, but it's really nice to work with a tool that only changes when I want it to change.
Using the arrows keys and the mouse?
emacs
- Modern keybindings and shortcuts
- mouse support, scrolling support
- copy/paste from the clipboard
- syntax highlighting
- supports extensions
All out of the box. Just wish the community extensions were more numerous but haven't written any myself and won't complain.
edit: Try tome! Dont' want to hijack this thread
Still V8 though.
Tomedit. Tomale. Lots of words to play with.
https://github.com/blakemcbride/TECOC
seriously. try it.
That kills it for me. Terminal apps in Python or JS works but are significantly slower, and you can feel it.
Talking in general. Not this one. I haven't tried this one.
I completely understand the conflation of cli and "uses a terminal" of course it is the goddamned year our our lord two thousand dickity twenty three after all, can't fight the jargon drift forever; I just think there is still room in the world for a new text editing command language that exists independent of a particular visual representation.
Within reason, yeah. But it's obnoxious to have the ambiguity, and what term do we use now for an editor that you interact with from the shell's command line (eg. sed, I guess?), or principally from its own command line (eg. ed)? While we're at it, if we're coining new terms, ideally we could distinguish those two.
sed in particular is "the streaming editor" but "streaming" isn't the category I'm looking for, which would also include something like nmh for mail (vs the traditional mail client behaving like ed, or things like mutt/pine that run in the terminal but provide more of a GUI that happens to be rendered in text).
I don't think that’s fully correct.
https://en.wikipedia.org/wiki/Line_editor (emphasis added):
“a line editor is a text editor in which each editing command applies to _one_or_more_ complete lines of text designated by the user”
Also, ed commands all can work on multiple lines by prefixing them with an address range. For example,
1,4l
will output the first four lines of the file to the output device.I also think a defining feature is that line editors don’t automatically show a full screen of the document because they’re designed to be usable on a teletype, where printing a line took about 10 seconds. In fact, even just outputting the current line after each command was considered wasteful.
please stop ... my sides ... I'm in stitches.
...I mean it's not my favourite, but acting like that's some kind of massive barrier to users of a CLI editor is an overreaction.
I mean fair enough if you don't like it. But it's nothing if not easy to run.
As with most things outside of tight loops in games, good architectural decisions are going to matter a lot more than language choice. Premature optimization is the root of all evil, but if I see that the algorithm is inefficient in practice I'll change the algorithm.
Ah, you've never had the pleasure of using Emacs I see.
So I think it's more down to the implementation than the language it's written in. V8 is really efficient at running JS, what slows it down is the 25 levels of abstraction and indirection that is usually added on top of it. OP claims to try to reduce that, so maybe give it a chance?
How times change.
Shots fired.
Building your own editor is a fun project for sure. Curious with node whether you can build it into a single executable that you can, for example, conveniently scp around to host:.local/bin/
There are ways to make a binary/flatpack/etc., but since Node.js is used by many things it probably makes more sense not to. Notably debian 12 ships with Node.js 18, which will probably be supported by tome for as long as it's supported by debian e.g. quite a while.
Building tools like this is great practice for learning new languages.
Good work Tom :) I'll give it a shot BECAUSE I CAN!
A TUI editor called THE already exists: The Hessling Editor, a work-alike of xedit.