aligrudi / neatvi

A small vi/ex editor for editing UTF-8 text
http://litcave.rudi.ir/
305 stars 25 forks source link

Open neatvi taking stdin as entry #74

Open lobre opened 9 months ago

lobre commented 9 months ago

I don't know if this is something doable in vi/nvi but in vim/nvim or kakoune, you can redirect the output of a command in the shell to the editor.

git ls-files | vim -
git ls-files | kak

Would it be something that would make sense to have in neatvi? It can serve to have initial data for a new file or to serve as a pager to quickly review the output of a command.

kyx0r commented 8 months ago

In case you haven't seen it already, Nextvi implements this feature as a patch. It might not be trivial to adapt to Neatvi codebase, but at least you could use this as a starting point: stdin_pipe.patch

lobre commented 8 months ago

That is a nice feature that enables interesting workflow in a UNIX philosophy. Thank you for posting that.

Is such a patch too complicated to be adapted to neatvi's codebase @aligrudi?

polluks commented 4 months ago

@kyx0r BSD vi says: ex/vi: Vi's standard input and output must be a terminal. Maybe master Neatvi should also complain.