vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
README.md
(6148B)
1 # Vis - Combining Modal Editing with Structural Regular Expressions
2
3 [](https://lists.sr.ht/~martanne/devel)
4 [](https://builds.sr.ht/~martanne/vis/commits?)
5 [](https://scan.coverity.com/projects/3939)
6 [](https://codecov.io/gh/martanne/vis)
7 [](http://vis.readthedocs.io/en/master/?badge=master)
8 [](ircs://irc.libera.chat:6697/vis-editor)
9
10 Vis aims to be a modern, legacy-free, simple yet efficient editor,
11 combining the strengths of both vi(m) and sam.
12
13 It extends vi's modal editing with built-in support for multiple
14 cursors/selections and combines it with [sam's](http://sam.cat-v.org/)
15 [structural regular expression](http://doc.cat-v.org/bell_labs/structural_regexps/)
16 based [command language](http://doc.cat-v.org/bell_labs/sam_lang_tutorial/).
17
18 A universal editor, it has decent Unicode support and should cope with arbitrary
19 files, including large, binary or single-line ones.
20
21 Efficient syntax highlighting is provided using
22 [Parsing Expression Grammars](https://en.wikipedia.org/wiki/Parsing_expression_grammar),
23 which can be conveniently expressed using [Lua](http://www.lua.org/)
24 in the form of [LPeg](http://www.inf.puc-rio.br/~roberto/lpeg/).
25
26 The editor core is written in a reasonable amount of clean (your mileage
27 may vary), modern and legacy-free C code, enabling it to run in
28 resource-constrained environments. The implementation should be easy to hack on
29 and encourages experimentation. There is also a Lua API for in-process
30 extensions.
31
32 Vis strives to be *simple* and focuses on its core task: efficient text
33 management. Clipboard and digraph handling as well as a fuzzy file open
34 dialog are all provided by independent utilities. There exist plans to use
35 a client/server architecture, delegating window management to your windowing
36 system or favorite terminal multiplexer.
37
38 The intention is *not* to be bug-for-bug compatible with vi(m). Instead,
39 we aim to provide more powerful editing features based on an elegant design
40 and clean implementation.
41
42 [](https://asciinema.org/a/41361)
43
44 Build instructions
45 ------------------
46
47 In order to build vis you will need a
48 [C99](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf)
49 compiler, a [POSIX.1-2008](http://pubs.opengroup.org/onlinepubs/9699919799/)
50 compatible environment as well as:
51
52 * [libtermkey](http://www.leonerd.org.uk/code/libtermkey/)
53 * [curses](https://en.wikipedia.org/wiki/Curses_(programming_library)) (recommended)
54 * [Lua](http://www.lua.org/) >= 5.2 (optional)
55 * [LPeg](http://www.inf.puc-rio.br/~roberto/lpeg/) >= 0.12
56 (optional runtime dependency required for syntax highlighting)
57 * [TRE](http://laurikari.net/tre/) (optional for more memory efficient regex search)
58
59 Assuming these dependencies are met, execute:
60
61 $ ./configure && make && sudo make install
62
63 By default the `configure` script will try to auto detect support for
64 Lua using `pkg-config(1)`. See `configure --help` for a list of supported
65 options. You can also manually tweak the generated `config.mk` file.
66
67 Or simply use one of the
68 [distribution provided packages](https://github.com/martanne/vis/wiki/Distribution-Packages).
69
70 Documentation
71 -------------
72
73 End user documentation can be found in the
74 [`vis(1)` manual page](http://martanne.github.io/vis/man/vis.1.html)
75 and the [Wiki](https://github.com/martanne/vis/wiki). Read the
76 [FAQ](https://github.com/martanne/vis/wiki/FAQ) for common questions.
77 Learn about some differences compared to
78 [`sam(1)`](https://github.com/martanne/vis/wiki/Differences-from-Sam) and
79 [`vim(1)`](https://github.com/martanne/vis/wiki/Differences-from-Vi(m)),
80 respectively.
81
82 [C API](https://vis.readthedocs.io/) as well as [Lua API](http://martanne.github.io/vis/doc/)
83 documentation is also available.
84
85 Non Goals
86 ---------
87
88 Some features which will *not* be implemented:
89
90 - tabs / multiple workspaces / advanced window management
91 - file and directory browser
92 - support for file archives (tar, zip, ...)
93 - support for network protocols (ftp, http, ssh ...)
94 - encryption
95 - compression
96 - GUIs (neither x11, motif, gtk, win32 ...) although the codebase
97 should make it easy to add them
98 - VimL
99 - right-to-left text
100 - ex mode, we have more elegant structural regexp
101 - diff mode
102 - vimgrep
103 - internal spell checker
104 - lots of compile time configurable features / `#ifdef` mess
105
106 How to help?
107 ------------
108
109 There are plenty of ways to contribute, below are a few ideas:
110
111 * Artwork
112 - [Color Themes](https://github.com/martanne/vis/wiki/Themes)
113 - [Name](https://github.com/martanne/vis/issues/338) +
114 [Logo](https://github.com/martanne/vis/issues/328)
115 - Homepage?
116 * Documentation
117 - [Manual Pages](https://github.com/martanne/vis/wiki/Developer-Overview#manual-pages)
118 - Improve `:help` output
119 * Lua
120 - [API Documentation](https://github.com/martanne/vis/wiki/Developer-Overview#api-documentation)
121 and Examples
122 - [Unit Tests](https://github.com/martanne/vis-test/tree/master/lua)
123 - [Plugin Development](https://github.com/martanne/vis/wiki/Plugins)
124 - [API Design](https://github.com/martanne/vis/issues/292)
125 * [Testing Infrastructure](https://github.com/martanne/vis-test)
126 * [Distribution Packaging](https://github.com/martanne/vis/wiki/Distribution-Packages)
127 * [Core Editor Design](https://github.com/martanne/vis/issues?q=is%3Aopen+is%3Aissue+label%3Adesign)
128
129 Checkout the [Developer Overview](https://github.com/martanne/vis/wiki/Developer-Overview)
130 to get started and do not hesitate to ask question in the `#vis-editor`
131 IRC channel on libera ([join via your browser](https://web.libera.chat/#vis-editor)).