TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

OpenVi: Portable OpenBSD vi for Unix systems

109 pointsby rdpintqogeogsaaover 3 years ago

11 comments

ruhrharryover 3 years ago
Last time I checked OpenBSD's vi didn't support utf8 - this is a show stopper in 2022.
评论 #30395564 未加载
评论 #30395962 未加载
评论 #30399347 未加载
评论 #30395774 未加载
评论 #30397519 未加载
评论 #30396222 未加载
评论 #30396567 未加载
trnover 3 years ago
It isn&#x27;t really an &quot;old&quot; version of Nvi by any means - the development went in a different direction. OpenBSD&#x27;s vi has been developed mostly independently since being imported back in 1997.<p>The documentation has been updated to explain the rationale - see <a href="https:&#x2F;&#x2F;github.com&#x2F;johnsonjh&#x2F;OpenVi#why" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;johnsonjh&#x2F;OpenVi#why</a><p>In the 25 years since the &quot;fork&quot;, OpenBSD vi has diverged significantly from Nvi1 (as Nvi2 has diverged from Nvi1 as well).<p>It has grown much smaller and more compact - one might argue more focused.<p>Much of the code has been simplified and many features removed, rather than added. Still, it has adopted features and taken some fixes back from Nvi1&#x2F;Nvi2 versions and other variants, such as adopting support for expandtab from NetBSD&#x27;s variant.<p>You can get a good idea of the history of this particular fork by reviewing the ChangeLog at <a href="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;johnsonjh&#x2F;OpenVi&#x2F;master&#x2F;ChangeLog" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;johnsonjh&#x2F;OpenVi&#x2F;master&#x2F;Ch...</a> where the OpenBSD changes begin in 1997.
trnover 3 years ago
Hi, I&#x27;m the &quot;perpetrator&quot; responsible for OpenVi. Apologies to everyone! &#x2F;s<p>I&#x27;ve added details to the README to hopefully explain why it exists: <a href="https:&#x2F;&#x2F;github.com&#x2F;johnsonjh&#x2F;OpenVi#why" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;johnsonjh&#x2F;OpenVi#why</a><p>The OpenVi ChangeLog at <a href="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;johnsonjh&#x2F;OpenVi&#x2F;master&#x2F;ChangeLog" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;johnsonjh&#x2F;OpenVi&#x2F;master&#x2F;Ch...</a> includes all the history going back to 1993&#x27;s Nvi 0.93. Nvi 1.79 was released in 1996, which is the version OpenBSD&#x27;s vi was derived from.<p>The ChangeLog entries are only a summary of the full commit messages - the complete details are in OpenBSD&#x27;s CVS tree, and viewable a bit easier via GitHub (<a href="https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;usr.bin&#x2F;vi" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;usr.bin&#x2F;vi</a>)<p>Changes to the (OpenVi bundled) OpenBSD regular expression engine are not included in the legacy ChangeLog, but you can see that development in the CVS tree or via GitHub as well (<a href="https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;lib&#x2F;libc&#x2F;regex" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;lib&#x2F;libc&#x2F;regex</a>).<p>OpenVi also utilizes the OpenBSD version of Berkely DB (<a href="https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;lib&#x2F;libc&#x2F;db" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;lib&#x2F;libc&#x2F;db</a>).
DarylZeroover 3 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;neovim&#x2F;neovim&#x2F;wiki&#x2F;Installing-Neovim" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;neovim&#x2F;neovim&#x2F;wiki&#x2F;Installing-Neovim</a>
评论 #30402671 未加载
mstover 3 years ago
If you want to go ultimately minimalist <a href="http:&#x2F;&#x2F;ex-vi.sourceforge.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ex-vi.sourceforge.net&#x2F;</a> builds and runs on most modern systems just fine.<p>Having learned vi across eight-ish different unices at once my muscle memory is very minimalist so I tend to use ex-vi preferentially, simply because everything else adds features I don&#x27;t use that I can accidentally activate with a typo and break myself out of flow figuring out wtf just happened.<p>I can absolutely imagine that for somebody who tends to use OpenBSD on their own machines, being able to have the exact same editor elsewhere could be really quite handy for much the same reasons.
评论 #30402073 未加载
评论 #30399366 未加载
ayushnixover 3 years ago
I&#x27;ve been using busybox vi as my root editor but it doesn&#x27;t have secure mode which disables shell access within vi. It looks like OpenVi and nvi2 have them. Are they preferable to busybox vi if I want better security as a root editor?
评论 #30396779 未加载
评论 #30396883 未加载
评论 #30422165 未加载
thristianover 3 years ago
Why would somebody want to use this over nvi, elvis, or the original BSD vi?<p>(I assume that people who are interested in features already know where to find (Neo)Vim.)
评论 #30396227 未加载
评论 #30396212 未加载
trnover 3 years ago
Cleanly doing UTF-8 support (the &quot;right&quot; way) is planned but is certainly non-trivial ... for example, see:<p><a href="https:&#x2F;&#x2F;www.openbsd.org&#x2F;papers&#x2F;eurobsdcon2016-utf8.pdf" rel="nofollow">https:&#x2F;&#x2F;www.openbsd.org&#x2F;papers&#x2F;eurobsdcon2016-utf8.pdf</a> and <a href="http:&#x2F;&#x2F;www.usenix.org&#x2F;events&#x2F;usenix99&#x2F;full_papers&#x2F;hagino&#x2F;hagino.ps" rel="nofollow">http:&#x2F;&#x2F;www.usenix.org&#x2F;events&#x2F;usenix99&#x2F;full_papers&#x2F;hagino&#x2F;hag...</a><p>Nvi2 (and Nvi1) are excellent editors, but I wouldn&#x27;t want to copy the Nvi2 implementation directly. This has been talked about elsewhere*<p>* <a href="https:&#x2F;&#x2F;misc.openbsd.narkive.com&#x2F;9NHoQv8L&#x2F;nvi-and-unicode#post4" rel="nofollow">https:&#x2F;&#x2F;misc.openbsd.narkive.com&#x2F;9NHoQv8L&#x2F;nvi-and-unicode#po...</a>
tambourine_manover 3 years ago
Isn’t vi already in POSIX? What’s the advantage over what OpenBSD should include already?
评论 #30396289 未加载
hestefiskover 3 years ago
nvi is very fast.
评论 #30396877 未加载
评论 #30395456 未加载
vermadenover 3 years ago
Its really pity that you can not disable wrapping in nvi(1) ...
评论 #30399157 未加载