News for hackers. Stuff that matters.
Re:I'm writing a new CLI text editor, because I can by danielvaughn on Friday September 22, 2023 @02:13PM (#37615556)
Honestly I really want to make one. Mostly because I want to stay in my terminal as much as possible, but I'm super fast with VSCode's keybindings and I can't handle the velocity drop during the learning curve.

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.

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.

Re:I'm writing a new CLI text editor, because I can by sixstringtheory on Friday September 22, 2023 @02:28PM (#37615769)
I went from VSCode back to emacs. I just stick with most of the emacs defaults, although I’m sure you could find a package for VSCode defaults.
Re:I'm writing a new CLI text editor, because I can by seanw444 on Friday September 22, 2023 @04:16PM (#37617192)
Yeah Emacs is insane. It's the only editor that is so customizable that it can imitate any other editor. Obviously, that comes with some effort to do, though.
Re:I'm writing a new CLI text editor, because I can by mplanchard on Friday September 22, 2023 @02:26PM (#37615744)
emacs and vim work well in the terminal and are almost certainly customizable enough to mimic the VSCode keybindings, /but/ definitely not without a velocity drop while you get everything set up as you like it
Re:I'm writing a new CLI text editor, because I can by marssaxman on Friday September 22, 2023 @02:53PM (#37616133)
You should! It's a satisfying exercise, and it's not hard to get an editor working well enough to be useful.

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.

Re:I'm writing a new CLI text editor, because I can by tombh on Friday September 22, 2023 @03:42PM (#37616747)
I actually wrote a (Neo)vim plugin to make it behave like a conventional editor https://github.com/tombh/novim-mode
Re:I'm writing a new CLI text editor, because I can by PrimeMcFly on Friday September 22, 2023 @10:41PM (#37620168)
but why?
Re:I'm writing a new CLI text editor, because I can by deepspace on Friday September 22, 2023 @04:20PM (#37617249)
My TUI editor of choice is "joe". It allows you to freely assign keybindings through a config file. Comes out of the box with Wordstar, Vi and Emacs bindings, but it is easy to roll your own.
Re:I'm writing a new CLI text editor, because I can by Aperocky on Friday September 22, 2023 @04:55PM (#37617647)
Well there are existing tools.. one of which starts with "v" and had more than 3 decades of changes and I found it achieving the purpose you described (with a small learning curve)
Re:I'm writing a new CLI text editor, because I can by jjav on Friday September 22, 2023 @08:41PM (#37619584)
> Mostly because I want to stay in my terminal as much as possible

emacs

Re:I'm writing a new CLI text editor, because I can by Scarbutt on Saturday September 23, 2023 @07:36PM (#37628653)
* I'm super fast with VSCode's keybindings*

Using the arrows keys and the mouse?