https://github.com/johnsonjh/OpenVi Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} johnsonjh / OpenVi Public * Notifications * Fork 1 * Star 36 * OpenVi: Portable OpenBSD vi for UNIX systems github.com/johnsonjh/openvi View license 36 stars 1 fork Star Notifications * Code * Issues 1 * Pull requests 0 * Security * Insights More * Code * Issues * Pull requests * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 11 tags Code Latest commit @johnsonjh johnsonjh Update README.md add a missing comma ... e4cdbfc Feb 19, 2022 Update `README.md` add a missing comma e4cdbfc Git stats * 195 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time cl Use internal reallocarray routines in regex engine; closes #5 Feb 19, 2022 common Begin 7.0.11-dev Feb 9, 2022 db Silence a few more warnings; adjust default debugging CFLAGS Feb 12, 2022 docs Bump version to 7.0.11 Feb 12, 2022 ex Bump version to 7.0.12-dev Feb 19, 2022 include Update bundled basename to 1.17 2020/10/20 19:30:14 Feb 12, 2022 scripts Use /var/tmp for the vi.recover directory; on most Linux systems,... Feb 4, 2022 vi Silence a few more warnings; adjust default debugging CFLAGS Feb 12, 2022 .gitattributes Update .gitattributes Jan 28, 2022 .gitignore Various clean-up Feb 3, 2022 .whitesource Add .whitesource configuration file Jan 24, 2022 ChangeLog Update README.md add a missing comma Feb 19, 2022 GNUmakefile Silence a few more warnings; adjust default debugging CFLAGS Feb 12, 2022 LICENSE.md Fix email address for millert@ Feb 12, 2022 README.md Update README.md add a missing comma Feb 19, 2022 View code [ ] OpenVi Table of Contents Overview Why? Why not? Building Prerequisites Required prerequisites Optional prerequisites Supported platforms Unsupported platforms Compilation Availability Versioning History License Acknowledgements Similar Projects See Also README.md OpenVi OpenVi -- Portable OpenBSD vi / ex Table of Contents * Overview + Why? o Why not? * Building + Prerequisites o Required prerequisites o Optional prerequisites o Supported platforms # Unsupported platforms + Compilation * Availability * Versioning * History * License * Acknowledgements * Similar Projects * See Also Overview OpenVi is an enhanced and portable implementation of the Berkeley vi / ex text editor, originally developed by Bill Joy. OpenVi is a fork of the vi / ex editor included with OpenBSD, which is derived from version 1.79 of the nvi editor originally distributed as part of the Fourth Berkeley Software Distribution (4BSD). The nvi editor was developed by Keith Bostic of the Computer Systems Research Group (CSRG) at the University of California, Berkeley, Sven Verdoolaege, and other contributors. Nvi itself was derived from Steve Kirkendall's Elvis editor. Why? Why would you want to use OpenVi instead of AnotherVi? * Derived from the (extensively audited) OpenBSD base system code + Focus on readability, simplicity, and correctness of implementation + Reduced cyclomatic complexity, correlated with fewer program defects * Clean and permissive 3-clause BSD license * Mostly conforming to relevant standards (POSIX, SUS) where applicable + Enhancements, non-standard behaviors, and new features are conservatively and sanely implemented with care taken to balance user expectations, complexity, and historical accuracy * Build requires only GNU Make and standard POSIX utilities + Easy integration with embedded, minimal, or iteratively bootstrapped environments and distributions (such as Linux From Scratch builds) * No compile-time or build-time configuration options + Single standard build configuration with no incompatible variants + No configuration-specific bugs resulting from untested combinations or rarely exercised code paths + Concise and understandable documentation; no subtle platform variations * Consistent user interface, script, and map behavior across all platforms * Utilizes OpenBSD's extended Spencer-based regular expression engine (also adopted by LLVM, Tcl, etc.) on all supported systems * Single, compact, self-contained binary + No external data files required at run-time + No external library dependencies (other than curses) o Suitable for static linking and emergency "rescue" usage * All the various tweaks, fixes, improvements, and clean-ups accumulated over 25+ years of development as part of the OpenBSD base system Why not? So, why might you not want to use OpenVi, then? Some of these points might be desirable features, depending on your point of view. * Internationalization support is currently lacking + No support for Unicode / UTF-8 / wide character display o Multi-byte characters are shown as individual bytes, rather than glyphs + No support for bidirectional text + No support for regional localization or message translation * Inefficient handling of extremely large (e.g. multi-GB) files * No support for syntax highlighting, context-aware code completion, code folding, or "language server" integrations * No interactive macro recording and debugging functionality * No advanced scripting support (no BASIC, COBOL, JavaScript, Lua, Perl, PHP, Python, REXX, Ruby, S-Lang, Tcl, or anything else) * Only curses-based visual-mode and line-based ex-mode interfaces available + No support for X11/Wayland, OpenGL/Vulkan, Neuralink, augmented / virtual reality, or any other graphical user interfaces Building Prerequisites Required prerequisites * POSIX environment: POSIX shell (sh) and utilities, Awk (mawk, nawk), etc. * GNU Make (version 3.81 or later) * C99 compiler (e.g. xlc, suncc, clang, gcc, etc.) * Curses (BSD curses, ncurses, PDCurses, PDCursesMod, etc.) Optional prerequisites * Perl 5+ * C shell (csh, tcsh, etc.) * nroff, groff, etc. Supported platforms * OpenVi is easily portable to most platforms with UNIX-like operating systems that are mostly conforming to the programming interface and user environment described by IEEE Std 1003.1, also known as POSIX.1. * The following operating systems are fully supported and regularly tested using ix86/AMD64, ARM/AArch64, m68k, MIPS, POWER, and RISC-V processors: + Linux (glibc and musl) + FreeBSD + OpenBSD + Darwin / macOS / Mac OS X (PowerPC, Intel, ARM64) + Microsoft Windows (WSL, Midipix) * The following compilers are fully supported and regularly tested: + Clang V6+ + GNU GCC V4.6+ + IBM XL C/C++ Compiler V16.1+ + Intel C Compiler Classic V19.1+ + Intel oneAPI DPC++/C++ Compiler V2021+ + Oracle Developer Studio V12.6+ Unsupported platforms * The following platforms are not currently supported, but support is planned for a future release. + IBM AIX 7.2+ + Haiku Walter + Oracle Solaris 10/11+ + illumos OpenIndiana Hipster + Microsoft Windows (Cygwin, MSYS2) User contributions to enhance platform support are welcomed. Compilation * Compilation can be performed by invoking GNU Make (usually gmake or make) from the top-level directory of a source release or git checkout. * GNU Make's -j N flag may be used to parallelize the compilation, where N is a positive integer representing the number of parallel jobs requested. * The following environment variables influence compilation and installation: + CC - C compiler to use o (e.g. CC=gcc) + OPTFLAGS - Optimization flags o (e.g. OPTFLAGS=-O2) + CFLAGS - Flags to pass to the C compiler o (e.g. CFLAGS="-Wall -pipe") + LDFLAGS - Flags to pass to the linker o (e.g. LDFLAGS="-L/lib/path -static") + V - Set to enable verbose compilation output o (e.g. V=1) + DEBUG - Set to compile a debugging build o (e.g. DEBUG=1) + LGC - Set to enable link-time garbage collection o (e.g. LGC=1) + LTO - Set to enable link-time optimization o (e.g. LTO=1) + EXTRA_LIBS - Extra libraries for linking o (e.g. EXTRA_LIBS=-lmtmalloc) + PREFIX - Directory prefix for use with install and uninstall targets o (e.g. PREFIX=/opt/OpenVi) * The usual targets (all, clean, install, uninstall) are available; review the GNUmakefile to see all the available targets and options. Availability * GitHub source repository * Latest source release Versioning The OpenVi version number is based on the version of the corresponding OpenBSD release, followed by the OpenVi release number. The version command can be used to display this information in the format shown below. Version 7.0.1 (OpenVi) 10/25/2021. This message indicates the editor in use is OpenVi, release 1, derived from OpenBSD version 7.0, and is fully synchronized with the OpenBSD versions of vi, ex, and db as of 10/25/2021 (October 25th 2021). Changes not derived from OpenBSD commits do not advance this date. History * OpenVi + ChangeLog + Release history + Commit history * OpenBSD vi / ex + Commit history * OpenBSD db + Commit history License * OpenVi is distributed under the terms of a 3-clause BSD license. * See the LICENSE.md file for the full license and distribution terms. Acknowledgements * rqsd of Libera.Chat for the idea that inspired the project and testing. * S. V. Nickolas, Jason Stevens, and the Virtually Fun Discord community, for support and feedback. * From the original vi acknowledgements (by Bill Joy & Mark Horton ): + Bruce Englar encouraged the early development of this display editor. + Peter Kessler helped bring sanity to version 2's command layout. + Bill Joy wrote version 1, versions 2.0 through 2.7, and created the framework that users see in the present editor. + Mark Horton added macros and other features, and made the editor work on a large number of terminals and UNIX systems. Similar Projects * Martin Guy's Xvi, an enhanced fork of Tim Thompson's STEVIE * S. V. Nickolas' Sivle, a cleaned-up fork of Steve Kirkendall's Elvis * Andy Valencia's Vim57, a simplified fork of version 5.7 of Bram Moolenaar's Vim See Also * Carsten Kunze's vi is the currently maintained fork of the original (2BSD) branch of the vi / ex editor, derived from Gunnar Ritter's enhanced version of the traditional vi editor. * Nvi2 is the currently maintained feature branch of the new (4BSD) version of the nvi / nex editor, with a focus on extensibility and new features. * Nvi1 (version 1.8+) is the currently maintained traditional branch of the new (4BSD) version of the nvi / nex editor, now developed by Sven Verdoolaege. About OpenVi: Portable OpenBSD vi for UNIX systems github.com/johnsonjh/openvi Topics c editor openbsd vi openvi Resources Readme License View license Stars 36 stars Watchers 2 watching Forks 1 fork Releases 11 OpenVi 7.0.11 Latest Feb 12, 2022 + 10 releases Contributors 3 * @johnsonjh johnsonjh Jeffrey H. Johnson * @Redfoxymoon Redfoxymoon Orjan Malde * @whitesource-bolt-for-github[bot] whitesource-bolt-for-github [bot] Languages * C 99.0% * Other 1.0% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.