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

text/edit/neatvi.lha

Mirror:Random
Showing:ppc-morphosgeneric
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:14
Architecture:ppc-morphos
URL:http://litcave.rudi.ir
Date:2024-03-20
Download:http://aminet.net/text/edit/neatvi.lha - View contents
Readme:http://aminet.net/text/edit/neatvi.readme
Downloads:695

NEATVI
======

Neatvi is a vi/ex editor.  It can edit bidirectional UTF-8 text.

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 edited.

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.

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.
- zL, zl, zr, and zR in normal mode: change 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.
- qX in normal mode: see q-commands section (X can be any letter).

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 ends with ls as directory
  listings; the gl command can be used to edit its files.

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.
shape
  If set (default), Arabic/Farsi letter shaping will be performed.
order
  If set, characters will be reordered based on the rules defined
  in conf.h.
hl, highlight
  If set (default), 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.
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 name of the current file
- " the default yank buffer
- ; the current line
- . the last vi command

Q-COMMANDS
----------

For qX command in normal mode, Neatvi executes ECMD (defined in conf.h)
with the following parameters:
- X (the key following q)
- current file
- current line number
- current line offset

ECMD must print a line of ex commands and Neatvi executes this line.
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.  As an example, the following
script shows how to use gopls to implement goto defintion and find
references for Go.

  # Compile.
  if test "$1" = "c"; then
    go build >.make.ls 2>&1
    echo ":e +1 .make.ls | :e"
  fi
  # Goto definition; uses gopls (not very efficient without using LSP).
  if test "$1" = "d"; then
    loc=`gopls definition $2:$3:$4`
    if test -n "$loc"; then
      echo $loc | sed -E 's/^([^:]+):([^:]+):([^:]+).*$/:e +\2 \1/'
    fi
  fi
  # Find references.  Use gl command on each line.
  if test "$1" = "f"; then
    gopls references $2:$3:$4 >$OUT/.out.ls
    echo ":e +1 $OUT/.out.ls | :e"
  fi


Contents of text/edit/neatvi.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[generic]                   12      12 100.0% -lh0- 1c8e Jan 12 09:19 neatvi-14/.gitignore
[generic]                 1164    3201  36.4% -lh5- 1e25 Jan 12 09:19 neatvi-14/cmd.c
[generic]                  644    2290  28.1% -lh5- 5d18 Jan 12 09:19 neatvi-14/conf.c
[generic]                 3366    9202  36.6% -lh5- 6ba4 Jan 12 09:19 neatvi-14/conf.h
[generic]                 1114    3005  37.1% -lh5- 0e08 Jan 12 09:19 neatvi-14/dir.c
[generic]                 7577   26703  28.4% -lh5- 04c0 Jan 12 09:19 neatvi-14/ex.c
[generic]                 2209    6880  32.1% -lh5- 7631 Jan 12 09:19 neatvi-14/kmap.h
[generic]                 2475    8526  29.0% -lh5- 625c Jan 12 09:19 neatvi-14/lbuf.c
[generic]                 3054    9426  32.4% -lh5- 0bbe Jan 12 09:19 neatvi-14/led.c
[generic]                  221     369  59.9% -lh5- c769 Jan 12 09:19 neatvi-14/Makefile
[generic]                 1548    5333  29.0% -lh5- 1d16 Jan 12 09:19 neatvi-14/mot.c
[generic]                 2458    5727  42.9% -lh5- c10b Jan 12 09:19 neatvi-14/README
[generic]                  528    1173  45.0% -lh5- 4bfa Jan 12 09:19 neatvi-14/reg.c
[generic]                 3934   13982  28.1% -lh5- 49fc Jan 12 09:19 neatvi-14/regex.c
[generic]                  236     481  49.1% -lh5- 937b Jan 12 09:19 neatvi-14/regex.h
[generic]                 1120    3628  30.9% -lh5- 8889 Jan 12 09:19 neatvi-14/ren.c
[generic]                 1225    3365  36.4% -lh5- 1baf Jan 12 09:19 neatvi-14/rset.c
[generic]                  957    2419  39.6% -lh5- 8cac Jan 12 09:19 neatvi-14/rstr.c
[generic]                  657    1724  38.1% -lh5- 77e7 Jan 12 09:19 neatvi-14/sbuf.c
[generic]                 6726   14560  46.2% -lh5- 46d6 Mar 20 19:00 neatvi-14/stag
[generic]                  811    1716  47.3% -lh5- 472a Jan 12 09:19 neatvi-14/stag.c
[generic]                  991    2578  38.4% -lh5- 0f77 Jan 12 09:19 neatvi-14/syn.c
[generic]                  633    1425  44.4% -lh5- 0ecb Jan 12 09:19 neatvi-14/tag.c
[generic]                 1513    4091  37.0% -lh5- 3216 Jan 12 09:19 neatvi-14/term.c
[generic]                  210     368  57.1% -lh5- 162c Jan 12 09:19 neatvi-14/test.sh
[generic]                   43      43 100.0% -lh0- 80b0 Jan 12 09:19 neatvi-14/test/e00.sh
[generic]                   82     131  62.6% -lh5- 7052 Jan 12 09:19 neatvi-14/test/e01.sh
[generic]                   93     184  50.5% -lh5- b0d3 Jan 12 09:19 neatvi-14/test/e02.sh
[generic]                   86     191  45.0% -lh5- 1ba7 Jan 12 09:19 neatvi-14/test/e03.sh
[generic]                  104     241  43.2% -lh5- 975c Jan 12 09:19 neatvi-14/test/e04.sh
[generic]                   98     212  46.2% -lh5- 7dab Jan 12 09:19 neatvi-14/test/e05.sh
[generic]                  110     271  40.6% -lh5- 0fe5 Jan 12 09:19 neatvi-14/test/e06.sh
[generic]                  119     289  41.2% -lh5- bebb Jan 12 09:19 neatvi-14/test/e07.sh
[generic]                  115     198  58.1% -lh5- f223 Jan 12 09:19 neatvi-14/test/e08.sh
[generic]                   98     172  57.0% -lh5- d0d3 Jan 12 09:19 neatvi-14/test/e09.sh
[generic]                   92     162  56.8% -lh5- 221c Jan 12 09:19 neatvi-14/test/e0a.sh
[generic]                  109     259  42.1% -lh5- 9062 Jan 12 09:19 neatvi-14/test/e0b.sh
[generic]                  115     341  33.7% -lh5- 2ade Jan 12 09:19 neatvi-14/test/e0c.sh
[generic]                  119     310  38.4% -lh5- c4cb Jan 12 09:19 neatvi-14/test/e0d.sh
[generic]                  117     202  57.9% -lh5- 1dfa Jan 12 09:19 neatvi-14/test/e0e.sh
[generic]                   99     187  52.9% -lh5- b511 Jan 12 09:19 neatvi-14/test/e0f.sh
[generic]                  105     197  53.3% -lh5- 382c Jan 12 09:19 neatvi-14/test/e10.sh
[generic]                   96     183  52.5% -lh5- 2e1a Jan 12 09:19 neatvi-14/test/e11.sh
[generic]                  106     239  44.4% -lh5- 0ee4 Jan 12 09:19 neatvi-14/test/e12.sh
[generic]                   92     123  74.8% -lh5- d3af Jan 12 09:19 neatvi-14/test/v00.sh
[generic]                  109     165  66.1% -lh5- 5170 Jan 12 09:19 neatvi-14/test/v01.sh
[generic]                  123     214  57.5% -lh5- 8be0 Jan 12 09:19 neatvi-14/test/v02.sh
[generic]                   97     145  66.9% -lh5- a3d2 Jan 12 09:19 neatvi-14/test/v03.sh
[generic]                  133     212  62.7% -lh5- 91d5 Jan 12 09:19 neatvi-14/test/v04.sh
[generic]                  113     172  65.7% -lh5- 8c93 Jan 12 09:19 neatvi-14/test/v05.sh
[generic]                  131     238  55.0% -lh5- 5e71 Jan 12 09:19 neatvi-14/test/v06.sh
[generic]                  107     208  51.4% -lh5- 567b Jan 12 09:19 neatvi-14/test/v07.sh
[generic]                   99     168  58.9% -lh5- 76e1 Jan 12 09:19 neatvi-14/test/v08.sh
[generic]                  114     197  57.9% -lh5- ec6d Jan 12 09:19 neatvi-14/test/v09.sh
[generic]                  120     213  56.3% -lh5- bec8 Jan 12 09:19 neatvi-14/test/v0a.sh
[generic]                  118     236  50.0% -lh5- 2808 Jan 12 09:19 neatvi-14/test/v0b.sh
[generic]                  108     186  58.1% -lh5- 5bf5 Jan 12 09:19 neatvi-14/test/v0c.sh
[generic]                  114     178  64.0% -lh5- 0152 Jan 12 09:19 neatvi-14/test/v0d.sh
[generic]                  133     250  53.2% -lh5- d3bb Jan 12 09:19 neatvi-14/test/v0e.sh
[generic]                  112     191  58.6% -lh5- 2a25 Jan 12 09:19 neatvi-14/test/v0f.sh
[generic]                  122     249  49.0% -lh5- bffa Jan 12 09:19 neatvi-14/test/v10.sh
[generic]                  119     214  55.6% -lh5- 7a57 Jan 12 09:19 neatvi-14/test/v11.sh
[generic]                  115     223  51.6% -lh5- 6424 Jan 12 09:19 neatvi-14/test/v12.sh
[generic]                  140     276  50.7% -lh5- 5e9f Jan 12 09:19 neatvi-14/test/v13.sh
[generic]                  123     219  56.2% -lh5- f120 Jan 12 09:19 neatvi-14/test/v14.sh
[generic]                  109     201  54.2% -lh5- 8620 Jan 12 09:19 neatvi-14/test/v15.sh
[generic]                  120     275  43.6% -lh5- 418f Jan 12 09:19 neatvi-14/test/v16.sh
[generic]                  113     227  49.8% -lh5- f085 Jan 12 09:19 neatvi-14/test/v17.sh
[generic]                   91     148  61.5% -lh5- 3edd Jan 12 09:19 neatvi-14/test/v18.sh
[generic]                   99     180  55.0% -lh5- 0c56 Jan 12 09:19 neatvi-14/test/v19.sh
[generic]                  108     183  59.0% -lh5- 1efa Jan 12 09:19 neatvi-14/test/v1a.sh
[generic]                  100     171  58.5% -lh5- 1752 Jan 12 09:19 neatvi-14/test/v1b.sh
[generic]                  111     196  56.6% -lh5- fa8d Jan 12 09:19 neatvi-14/test/v1c.sh
[generic]                   94     154  61.0% -lh5- 636e Jan 12 09:19 neatvi-14/test/v1d.sh
[generic]                  107     181  59.1% -lh5- aa4b Jan 12 09:19 neatvi-14/test/v1e.sh
[generic]                   96     153  62.7% -lh5- ae03 Jan 12 09:19 neatvi-14/test/v1f.sh
[generic]                   96     168  57.1% -lh5- 8146 Jan 12 09:19 neatvi-14/test/v20.sh
[generic]                   86     147  58.5% -lh5- a2aa Jan 12 09:19 neatvi-14/test/v21.sh
[generic]                   96     217  44.2% -lh5- a6eb Jan 12 09:19 neatvi-14/test/v22.sh
[generic]                  112     269  41.6% -lh5- b5ca Jan 12 09:19 neatvi-14/test/v23.sh
[generic]                 6862   21850  31.4% -lh5- 8413 Jan 12 09:19 neatvi-14/uc.c
[generic]                61273  151444  40.5% -lh5- 0e4c Mar 20 23:02 neatvi-14/vi
[generic]                 9919   36645  27.1% -lh5- fb9c Jan 12 09:19 neatvi-14/vi.c
[generic]                 2020    7060  28.6% -lh5- e05c Jan 12 09:19 neatvi-14/vi.h
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        84 files  131343  360342  36.4%            Mar 21 02:41

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>