AminetAminet
Search:
85173 packages online
About
Recent
Browse
Search
Upload
Setup
Services

text/edit/neatvi.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:Neat vi clone
Author: ali at rudi.ir (Ali Gholami Rudi)
Uploader:polluks+aminet sdf org (Stefan Haubenthal)
Type:text/edit
Version:18
Architecture:ppc-morphos
Date:2026-03-12
URL:http://litcave.rudi.ir
Download:text/edit/neatvi.lha - View contents
Readme:text/edit/neatvi.readme
Downloads:2434

NEATVI
======

Neatvi is a small vi/ex editor for editing UTF-8 text.  It supports
syntax highlighting, multiple windows, right-to-left languages, and
keymaps.

CONFIGURATION
-------------

Edit conf.h to adjust syntax highlighting rules and text direction
patterns.  To define a new keymap, create a new array in kmap.h, like
kmap_fa, and add it to kmaps array in the same header (the first entry
of the new array specifies its name).  The current keymap may be
changed with :cm ex command.  When in input mode, ^e activates the
English keymap and ^f switches to the alternate keymap (the last
keymap specified with :cm).

Sadly, VTE-based terminals such as GNOME's implement a
backward-incompatible extension of virtual terminal escape codes to
render bidirectional text by default.  When using these terminal, the
value of LNPREF macro in conf.h needs to be changed to "\33[8l".

COMMANDS
--------

Commands not available in ex(1):

:cm[ap][!] [kmap]
  Without kmap, prints the current keymap name.
  When kmap is specified, sets the alternate keymap to
  kmap and, unless ! is given, switches to this keymap.
:ft [filetype]
  Without filetype, prints the current file type.
  When filetype is specified, sets the file type of the
  current ex buffer.
:ta[g] tag
  Jumps to tag (tags file: TAGPATH environment variable or ./tags).
:tn[ext]
  Jumps to the next matching tag.
:tp[rev]
  Jumps to the previous matching tag.
:po[p]
  Pops tag stack.
:b[uffer] [buf]
  Without buf, prints buffer list.  Switches to the given buffer
  if buf is a buffer number or alias.  Also, buf can be -, +, !,
  and ~ to switch to the previous buffer, switch to the next buffer,
  delete the current buffer, and renumber buffers, respectively.
:rs reg
  Reads dot-terminated lines (similar to :a command) from ex input
  and copies them to the given yank buffer.
:rx reg cmd
  Like :! command, executes cmd.  However, the contents of the
  specified yank buffer is given to the command as input, and the
  output of the command is written to the same buffer.
:rk reg path
  Connects to a unix socket, writes the contents of the given buffer
  to it, and reads from the socket into the buffer.
:ra reg
  Similar to :@ command, executes the contents of the given buffer.
  Before executing the buffer, however, it replaces ^rx with the
  contents of buffer x, and ^vx with x, in which x is any character.
:ec[ho] msg
  Prints the given message (useful in ex scripts or q-commands).

New key mappings:
- ^a in normal mode: searches for the word under the cursor.
- ^p in insert mode: inserts the contents of the default yank buffer.
- ^rX in insert mode: inserts the contents of yank buffer X.
- z>, z<, 2z>, and 2z< in normal mode: changes the value of td option.
- ^e and ^f in insert mode: switches to the English and alternate keymap.
- ze and zf in normal mode: switches to the English and alternate keymap.
- gu, gU, and g~ in normal mode: switches character case.
- ^l in normal mode: updates terminal dimensions (after resizing it).
- ^] and ^t in normal mode: jumps to tag and pops tag stack.
- gf in normal mode: edits the file whose address is under the cursor.
- gl in normal mode: like gf, but it reads line and column numbers too.
- ^ws, ^wo, ^wc, ^wj, ^wk, ^wx in normal mode: manages windows.
- ^wgf, ^wgl, ^w^] in normal mode: executes gf, gl, ^] in a new window.
- zj, zk, zD: equivalent to :b+, :b-, :b !.
- zJ, zK: equivalent to :next, :prev.
- q in normal mode: see quick access section.
- ^a in ex, search, and pipe prompts: inserts from history lines.

Other noteworthy differences with vi(1):
- Neatvi assumes POSIX extended regular expressions (ERE) in search
  patterns, conf.h variables, and even tags files.
- If paths start with =, they are assumed to be relative to the
  directory of the current file.
- Neatvi highlights files whose names end with ls as directory
  listings; the gl command edits the file under the cursor.  For
  instance, git ls-files >ls && neatvi ls.
- In addition to the standard single-letter yank buffers, Neatvi
  supports a set of extended buffers whose two-letter names begin
  with a backslash, like \x.
- If EXINIT environment variable is defined as "so /path/to/exrc",
  Neatvi executes the ex commands in this file at startup.

Note that in :rs command, input lines are read from ex input stream
(unlike :a), to make it usable in @ commands and ex scripts (files
passed to :so).  This allows setting the value of yank buffers in ex
files, as the following example shows:

  rs a
  :!git add %
  .

OPTIONS
-------

To improve Neatvi's performance, shaping, character reordering, and
syntax highlighting can be disabled by defining the EXINIT environment
variable as "set noshape | set noorder | set nohl | set td=+2".

Options supported in Neatvi:

td, textdirection
  Current direction context.  The following values are meaningful:
  * +2: always left-to-right.
  * +1: follow conf.h's dircontexts[]; left-to-right for others.
  * -1: follow conf.h's dircontexts[]; right-to-left for others.
  * -2: always right-to-left.
  The default value is 0, which assumes left-to-right if the first
  character of the line is single-byte; otherwise, it follows
  dircontexts[].
shape
  If set, Arabic/Farsi letter shaping will be performed.
order
  If set, characters will be reordered based on the rules defined
  in conf.h.  If the value is 1, only lines with at least one
  multi-byte UTF-8 character are reordered.  If it is 2, all lines
  are reordered.
hl, highlight
  If set, text will be highlighted based on syntax highlighting
  rules in conf.h.
hll, highlightline
  If set, the current line will be highlighted.
lim, linelimit
  Lines longer than this value are not reordered or highlighted.
ru, ruler
  Indicates when to redraw the status line:
  * 0: never.
  * 1: always.
  * 2: when multiple windows are visible.
  * 4: when the current file changes.
hist, history
  Indicates the number of lines remembered for ex, search, and
  pipe prompts.  Zero disables command history.
ai, autoindent
  As in vi(1).
aw, autowrite
  As in vi(1).
ic, ignorecase
  As in vi(1).
wa, writeany
  As in vi(1).

MARKS AND BUFFERS
-----------------

Special marks:
- * the position of the previous change
- [ the first line of the previous change
- ] the last line of the previous change

Special yank buffers:
- / the previous search keyword
- : the previous ex command
- ! the previous pipe command
- % the name of the current file
- " the default yank buffer
- ; the current line
- . the last vi command
- # cursor line number
- ^ cursor line offset
- \/ search history
- \: ex command history
- \! pipe command history

QUICK ACCESS
------------

When q is pressed in normal mode, Neatvi prints the list of buffers at
the bottom of the screen and waits for a key.  If the key is a digit,
it switches to its corresponding buffer.  If it is a letter and the
extended buffer with that letter is defined, the contents of that
buffer is executed.  Otherwise, Neatvi executes ECMD (defined in
conf.h) with the following parameters: i) the letter, ii) the current
file, iii) the current line number, and iv) the current line offset.

What ECMD writes to its standard output, Neatvi executes as ex
commands.  Q-commands can be used to add interesting features to
Neatvi, such as language-dependent IDE features, for instance by
connecting to an LSP (language server protocol) server.  ecmd.sh is an
example ECMD shell script.

AUTO-COMPLETION
---------------

When the hist option is nonzero, Neatvi suggests the most recent
matching entry when reading user input for :, /, and ! prompts; ^a
completes the input using the suggestion.

On the other hand, when in insert mode, ^a changes the value of the
buffer named ~ to the contents of the current line up to the cursor,
and executes the contents of \~ buffer (as :ra \~).  The buffer can
execute any ex command (for instance, :ec to print a message), and
change the contents of ~ to suggest a completion; a second ^a inserts
the suggestion.  The following lines define \~ to demonstrate how it
works.

  rs \~
  ec completing '~'
  rs ~
  completion
  .
  .

In a real implementation, the \~ buffer can use external commands
(with rx or rk) to compute the completions.


Contents of text/edit/neatvi.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                   12      12 100.0% -lh0- 1c8e Feb  9 18:25 neatvi-18/.gitignore
[generic]                 1423    3925  36.3% -lh5- 5d8a Feb  9 18:25 neatvi-18/cmd.c
[generic]                 2506    8033  31.2% -lh5- fd55 Feb  9 18:25 neatvi-18/conf.c
[generic]                 3022    8071  37.4% -lh5- 8e96 Feb  9 18:25 neatvi-18/conf.h
[generic]                 1138    3065  37.1% -lh5- ba23 Feb  9 18:25 neatvi-18/dir.c
[generic]                 8994   32792  27.4% -lh5- 3358 Feb  9 18:25 neatvi-18/ex.c
[generic]                 2218    6918  32.1% -lh5- 1cb6 Feb  9 18:25 neatvi-18/kmap.h
[generic]                 2795    9659  28.9% -lh5- f18b Feb  9 18:25 neatvi-18/lbuf.c
[generic]                 2511    7532  33.3% -lh5- ab3a Feb  9 18:25 neatvi-18/led.c
[generic]                  221     374  59.1% -lh5- 598c Feb  9 18:25 neatvi-18/Makefile
[generic]                 1552    5348  29.0% -lh5- 15e7 Feb  9 18:25 neatvi-18/mot.c
[generic]                 1004    2057  48.8% -lh5- d913 Feb  9 18:25 neatvi-18/neatvi.sh
[generic]                 4582   11591  39.5% -lh5- e81f Feb  9 18:25 neatvi-18/README
[generic]                  594    1434  41.4% -lh5- b8f3 Feb  9 18:25 neatvi-18/reg.c
[generic]                 4103   14484  28.3% -lh5- 4e13 Feb  9 18:25 neatvi-18/regex.c
[generic]                  236     481  49.1% -lh5- 937b Feb  9 18:25 neatvi-18/regex.h
[generic]                 1189    3818  31.1% -lh5- e3b2 Feb  9 18:25 neatvi-18/ren.c
[generic]                 1225    3365  36.4% -lh5- 1baf Feb  9 18:25 neatvi-18/rset.c
[generic]                  957    2419  39.6% -lh5- 8cac Feb  9 18:25 neatvi-18/rstr.c
[generic]                  797    2290  34.8% -lh5- 01ba Feb  9 18:25 neatvi-18/sbuf.c
[generic]                 1401    3330  42.1% -lh5- c8a9 Feb  9 18:25 neatvi-18/stag.c
[generic]                 1091    2917  37.4% -lh5- e924 Feb  9 18:25 neatvi-18/syn.c
[generic]                 1406    4588  30.6% -lh5- 3159 Feb  9 18:25 neatvi-18/tag.c
[generic]                 1573    4271  36.8% -lh5- a81f Feb  9 18:25 neatvi-18/term.c
[generic]                  252     426  59.2% -lh5- 877c Feb  9 18:25 neatvi-18/test.sh
[generic]                   92     162  56.8% -lh5- 221c Feb  9 18:25 neatvi-18/test/e0a.sh
[generic]                  109     259  42.1% -lh5- 9062 Feb  9 18:25 neatvi-18/test/e0b.sh
[generic]                  115     341  33.7% -lh5- 2ade Feb  9 18:25 neatvi-18/test/e0c.sh
[generic]                  119     310  38.4% -lh5- c4cb Feb  9 18:25 neatvi-18/test/e0d.sh
[generic]                  117     202  57.9% -lh5- 1dfa Feb  9 18:25 neatvi-18/test/e0e.sh
[generic]                   99     187  52.9% -lh5- b511 Feb  9 18:25 neatvi-18/test/e0f.sh
[generic]                   43      43 100.0% -lh0- 80b0 Feb  9 18:25 neatvi-18/test/e00.sh
[generic]                   82     131  62.6% -lh5- 7052 Feb  9 18:25 neatvi-18/test/e01.sh
[generic]                   93     184  50.5% -lh5- b0d3 Feb  9 18:25 neatvi-18/test/e02.sh
[generic]                   86     191  45.0% -lh5- 1ba7 Feb  9 18:25 neatvi-18/test/e03.sh
[generic]                  104     241  43.2% -lh5- 975c Feb  9 18:25 neatvi-18/test/e04.sh
[generic]                   98     212  46.2% -lh5- 7dab Feb  9 18:25 neatvi-18/test/e05.sh
[generic]                  110     271  40.6% -lh5- 0fe5 Feb  9 18:25 neatvi-18/test/e06.sh
[generic]                  119     289  41.2% -lh5- bebb Feb  9 18:25 neatvi-18/test/e07.sh
[generic]                  115     198  58.1% -lh5- f223 Feb  9 18:25 neatvi-18/test/e08.sh
[generic]                   98     172  57.0% -lh5- d0d3 Feb  9 18:25 neatvi-18/test/e09.sh
[generic]                  105     197  53.3% -lh5- 382c Feb  9 18:25 neatvi-18/test/e10.sh
[generic]                   96     183  52.5% -lh5- 2e1a Feb  9 18:25 neatvi-18/test/e11.sh
[generic]                  106     239  44.4% -lh5- 0ee4 Feb  9 18:25 neatvi-18/test/e12.sh
[generic]                  104     210  49.5% -lh5- 3427 Feb  9 18:25 neatvi-18/test/e13.sh
[generic]                   92     196  46.9% -lh5- aa64 Feb  9 18:25 neatvi-18/test/e14.sh
[generic]                   98     201  48.8% -lh5- 0b7a Feb  9 18:25 neatvi-18/test/e15.sh
[generic]                   99     194  51.0% -lh5- 2bd6 Feb  9 18:25 neatvi-18/test/e16.sh
[generic]                   97     186  52.2% -lh5- 1bdc Feb  9 18:25 neatvi-18/test/e17.sh
[generic]                  120     213  56.3% -lh5- bec8 Feb  9 18:25 neatvi-18/test/v0a.sh
[generic]                  118     236  50.0% -lh5- 2808 Feb  9 18:25 neatvi-18/test/v0b.sh
[generic]                  108     186  58.1% -lh5- 5bf5 Feb  9 18:25 neatvi-18/test/v0c.sh
[generic]                  114     178  64.0% -lh5- 0152 Feb  9 18:25 neatvi-18/test/v0d.sh
[generic]                  133     250  53.2% -lh5- d3bb Feb  9 18:25 neatvi-18/test/v0e.sh
[generic]                  112     191  58.6% -lh5- 2a25 Feb  9 18:25 neatvi-18/test/v0f.sh
[generic]                   92     123  74.8% -lh5- d3af Feb  9 18:25 neatvi-18/test/v00.sh
[generic]                  109     165  66.1% -lh5- 5170 Feb  9 18:25 neatvi-18/test/v01.sh
[generic]                  123     214  57.5% -lh5- 8be0 Feb  9 18:25 neatvi-18/test/v02.sh
[generic]                   97     145  66.9% -lh5- a3d2 Feb  9 18:25 neatvi-18/test/v03.sh
[generic]                  133     212  62.7% -lh5- 91d5 Feb  9 18:25 neatvi-18/test/v04.sh
[generic]                  113     172  65.7% -lh5- 8c93 Feb  9 18:25 neatvi-18/test/v05.sh
[generic]                  131     238  55.0% -lh5- 5e71 Feb  9 18:25 neatvi-18/test/v06.sh
[generic]                  107     208  51.4% -lh5- 567b Feb  9 18:25 neatvi-18/test/v07.sh
[generic]                   99     168  58.9% -lh5- 76e1 Feb  9 18:25 neatvi-18/test/v08.sh
[generic]                  114     197  57.9% -lh5- ec6d Feb  9 18:25 neatvi-18/test/v09.sh
[generic]                  108     183  59.0% -lh5- 1efa Feb  9 18:25 neatvi-18/test/v1a.sh
[generic]                  100     171  58.5% -lh5- 1752 Feb  9 18:25 neatvi-18/test/v1b.sh
[generic]                  111     196  56.6% -lh5- fa8d Feb  9 18:25 neatvi-18/test/v1c.sh
[generic]                   94     154  61.0% -lh5- 636e Feb  9 18:25 neatvi-18/test/v1d.sh
[generic]                  107     181  59.1% -lh5- aa4b Feb  9 18:25 neatvi-18/test/v1e.sh
[generic]                   96     153  62.7% -lh5- ae03 Feb  9 18:25 neatvi-18/test/v1f.sh
[generic]                  122     249  49.0% -lh5- bffa Feb  9 18:25 neatvi-18/test/v10.sh
[generic]                  111     205  54.1% -lh5- 2fe0 Feb  9 18:25 neatvi-18/test/v11.sh
[generic]                  115     223  51.6% -lh5- 6424 Feb  9 18:25 neatvi-18/test/v12.sh
[generic]                  140     276  50.7% -lh5- 5e9f Feb  9 18:25 neatvi-18/test/v13.sh
[generic]                  123     219  56.2% -lh5- f120 Feb  9 18:25 neatvi-18/test/v14.sh
[generic]                  109     201  54.2% -lh5- 8620 Feb  9 18:25 neatvi-18/test/v15.sh
[generic]                  120     275  43.6% -lh5- 418f Feb  9 18:25 neatvi-18/test/v16.sh
[generic]                  113     227  49.8% -lh5- f085 Feb  9 18:25 neatvi-18/test/v17.sh
[generic]                   91     148  61.5% -lh5- 3edd Feb  9 18:25 neatvi-18/test/v18.sh
[generic]                  110     239  46.0% -lh5- 1a7e Feb  9 18:25 neatvi-18/test/v19.sh
[generic]                   96     168  57.1% -lh5- 8146 Feb  9 18:25 neatvi-18/test/v20.sh
[generic]                   86     147  58.5% -lh5- a2aa Feb  9 18:25 neatvi-18/test/v21.sh
[generic]                   96     217  44.2% -lh5- a6eb Feb  9 18:25 neatvi-18/test/v22.sh
[generic]                  105     260  40.4% -lh5- a9c2 Feb  9 18:25 neatvi-18/test/v23.sh
[generic]                  109     236  46.2% -lh5- 23c5 Feb  9 18:25 neatvi-18/test/v24.sh
[generic]                   80     102  78.4% -lh5- 807f Feb  9 18:25 neatvi-18/test/v25.sh
[generic]                  127     261  48.7% -lh5- 8b52 Feb  9 18:25 neatvi-18/test/v26.sh
[generic]                   78     104  75.0% -lh5- 5da0 Feb  9 18:25 neatvi-18/test/v27.sh
[generic]                 6865   21850  31.4% -lh5- a35d Feb  9 18:25 neatvi-18/uc.c
[generic]                13132   46726  28.1% -lh5- 6795 Feb  9 18:25 neatvi-18/vi.c
[generic]                 2277    7962  28.6% -lh5- 24da Feb  9 18:25 neatvi-18/vi.h
[generic]                72616  162856  44.6% -lh5- a28b Mar 12 00:19 neatvi-17/vi
[generic]                10203   21024  48.5% -lh5- 5462 Mar 12 00:18 neatvi-17/stag
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        94 files  158661  416508  38.1%            Mar 12 02:57
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>