Hacker News new | ask | show | jobs
by random_mutex 1042 days ago
>One "meta feature" that was dropped was the ability to build the editor with or without different features. vim --version shows a long list of +/- features, neovim doesn't do that.

What's wrong with all features enabled by default?

> I'm sure neovim dropped a lot but I don't have the full overview.

https://neovim.io/doc/user/vim_diff.html

>Prominently it dropped support for giving !commands access to the actual tty. Commands that access the tty have to be used through the command :term instead.

Why would you run an interactive command with `:!` ?

3 comments

> Why would you run an interactive command with `:!` ?

Why wouldn't you? Vi's `:!` is simple and general.

If neovim has an equivalent, it must be obscure enough that no one has mentioned it yet, and it seems to me that the obvious thing to do would be to make `:!` do it by default, and put neovim's current `:!` behaviour behind a `compatible` flag for those who want it.

That does sound kind of like a missed opportunity. Not sure why it's not like that.

The closest neovim equivalent I can think of is :term <command>

`:term` is much more intrusive; you can't just `:!foo` and get on with what you're doing. For one thing, you can't `:term foo` with a modified file, which is not an unusual state when you're editing.
Using `:!` as a filter for text and running interactive commands doesn't overlap for me, so I haven't seen that as an issue.
> Why would you run an interactive command with `:!` ?

I ran up against this limitation recently. The kitty terminal exposes APIs allowing processes to communicate with the terminal using escape codes. I wanted to configure Neovim to access the system clipboard using kitty’s API, so that I could copy/paste from within Neovim even over SSH. However, this would require Neovim to give the clipboard subprocess access to the controlling TTY. (Running it within :term would not work, as the escape sequences would thus be passed to Neovim’s virtual terminal emulator, not the instance of kitty that Neovim itself is running within.)

neovim supports OSC 52 out of the box so clipboard over SSH should just wrk in kitty or any terminal that supports OSC 52. kitty of course supports a lot more than OSC 52 but for basic opy/paste of plain text, OSC 52 is sufficient.
Neovim doesn’t support OSC 52 unless I’m missing something. There’s an open issue: https://github.com/neovim/neovim/issues/3344

It’s easy to implement OSC 52 copy with a simple script/plugin, but apparently not paste without adding some code inside of Neovim itself.

What's wrong? I didn't mean it like that, I've just listed it as a thing that was removed.

And about !, It's also listed as a thing that changed, no judgment. Regarding usecases I think if it's possible, some user will take advantage of it.