lichray / nvi2

A multibyte fork of the nvi editor for BSD
Other
144 stars 34 forks source link

filter read lines bypass `expandtab` #108

Closed johnsonjh closed 2 years ago

johnsonjh commented 2 years ago

Right now, :read! printf '\t' will insert a tab regardless of the expandtab setting, which might be inconsistent with the intent of https://github.com/lichray/nvi2/commit/7d3f43559026e0927032a105b217850feaefec66, as !!printf '\t' does respect expandtab.

I'm considering doing something like this in OpenVi, but having the expandtab behavior on filtering enabled with an option separate from plain expandtab. I'm not even totally sure that these two filters should be the same re: expandtab.

Regardless, as it is now, the nvi2 behavior might be a bit confusing.

lichray commented 2 years ago

The current behavior sounds reasonable to me, as :r from a file on disk doesn't apply filter either. The meaning of the last ! is always overloaded for different commands.

johnsonjh commented 2 years ago

I tend to agree with you on this one. I'll close this out for now. I'll consider a reexpandtab or similar for myself and once I figure out something that is sane, I'll let you look at it.