News for hackers. Stuff that matters.
Re:I'm writing a new CLI text editor, because I can by boutell on Friday September 22, 2023 @02:28PM (#37615766)
Yes, you're in for some disappointment there alas: many terminal applications, especially macOS terminal, will devour most cool combinations of the "meta" keys (shift, control, alt, command...) for themselves. This is why I had to make a slightly modal "select mode" entered with the escape key. I'm still trying to make it mostly familiar but 100% vscode keybindings isn't possible.
Re:I'm writing a new CLI text editor, because I can by hmry on Friday September 22, 2023 @02:36PM (#37615899)
That just means you'll need to write a terminal emulator as well :)
Re:I'm writing a new CLI text editor, because I can by psyclobe on Friday September 22, 2023 @03:01PM (#37616243)
That’s the spirit; because we can!!
Re:I'm writing a new CLI text editor, because I can by tough on Friday September 22, 2023 @03:14PM (#37616396)
you could technically also use an app like iTerm2.app which lets you control most of this.

You could also take the pill and make 180 turn and put vim bindings on VSCode, lmao

Re:I'm writing a new CLI text editor, because I can by emi2k01 on Friday September 22, 2023 @03:36PM (#37616682)
Re:I'm writing a new CLI text editor, because I can by pianohacker on Friday September 22, 2023 @04:46PM (#37617555)
You can do a lot with the Kitty keyboard protocol: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#comprehen...
Re:I'm writing a new CLI text editor, because I can by cstrahan on Friday September 22, 2023 @06:22PM (#37618527)
Easy fix: Use a more featureful (and more spec compliant) terminal emulator, like Kitty or WezTerm, and enable the Kitty keyboard protocol.

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.

https://wezfurlong.org/wezterm/

https://sw.kovidgoyal.net/kitty/

Re:I'm writing a new CLI text editor, because I can by CGamesPlay on Friday September 22, 2023 @07:49PM (#37619232)
Neat, there is a tracking issue to add support in the iTerm2 repo as well: https://gitlab.com/gnachman/iterm2/-/issues/10017
Re:I'm writing a new CLI text editor, because I can by Fnoord on Friday September 22, 2023 @10:30PM (#37620123)
How does it compare to Alacrity?
Re:I'm writing a new CLI text editor, because I can by cstrahan on Friday September 22, 2023 @11:22PM (#37620340)
It's been a while since I looked at Alacritty, so I've tried to double check things, but feel free to add corrections in the comments in case I get some of this wrong.

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.