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

text/edit/nextvi.lha

Mirror:Random
Showing: m68k-amigaos icongeneric icon
No screenshot available
Short:Next vi clone
Author:"Kyryl Melekhin" k.melekhin at gmail.com
Uploader:polluks+aminet sdf org (Stefan Haubenthal)
Type:text/edit
Version:2.5
Architecture:ppc-morphos
Date:2025-12-22
Download:text/edit/nextvi.lha - View contents
Readme:text/edit/nextvi.readme
Downloads:2008

NEXTVI PATCHES
==============
Optional patches for Nextvi.
Apply: patch < name.patch

64bit.sh
--------------
Convert entire codebase to 64 bit integers instead of 32 bit.
This will enable Nextvi to read files & buffers up to 9,223,372 Terabytes.
In addition, this will improve performance on 64 bit CPUs due to
matching pointer <---> integer alignment and possibly more compiler
optimizations.
Run this after you've applied the patches.

gen-widechars.sh
--------------
A script I use to update zwchars and dwchars in uc.c

arrowkeys_normal.patch
--------------
Adds arrows keys support in normal mode.

arrowkeys_insert.patch
--------------
Adds arrows keys support in insert mode.

threaded_search.patch
--------------
Multithreaded version of lbuf_search(). Adjust the number of threads in use
and buffer stepping in lbuf.c Ensure that your system supports posix threads,
aka libpthread

hl_part.patch
--------------
Allow syntax highlight to continue past the terminal dimensions up to a
certain limit. To customize the depth, adjust LEDFORW and LEDBACK definitions
in led.c
Patch will alter the meaning of <^> <$> assertions in syntax highlight
regex, as the line would be considered to start/end beyond the visible columns.
Patch works in reverse direction and with reordered text.

hl_naive.patch
--------------
Allow syntax highlight to continue past the terminal dimensions unlimited.
Performance will degrade on very long lines.

debug.patch
--------------
Cleanup reachable memory upon termination.
Use for debugging.
Note: in some features leaks won't be freed - for example hlw (which is not
enabled by default) Also initializes sdense in regex.c so that valgrind stops
freaking out.

grep.patch
--------------
Adds a special temporary buffer /grep/ much like the default /hist/ or /fm/.
When new keybind ^x is executed vi performs fs_search on every file and
stores the results in /grep/ buffer. At last, user will be switched to /grep/.
Line information is stored and displayed with special new syntax highlight
rules. Searched keyword is also highlighted.  Use the familiar keybind ^i or
TAB on the wanted line to immediately open the file and goto the line
specified. To quickly open /grep/ use new keybind: vx
The format of the lines stored is specifically designed to mirror the output of
grep -r -n "str" .
The feature can be substituted with a pipe command in case of a higher performing
grep implementation or loading of cached results from script.

rstr.patch
--------------
Adaptation from upstream Neatvi, where simple operations are optimized by
running a specialized search code instead of full regex engine. rstr can
yeild up to 3X faster search on non regex patterns. This is not included in
base nextvi due to underlying complexity.

stdin_pipe.patch
--------------
Allows the user to use vi like less except you need to specify
- as command line arg (just like in vim).
Example:
$ dmesg | vi -

ec_closebuf.patch
--------------
Allows the user to close the buffer using new ex command :cx
Specify a number as an arg for what buffer to close.
Specifying no argument(s) will close the current buffer.
When the buffer is closed all buffers above will be shifted
and renumbered.
Range can be supplied like so :cx0-5
This will close buffers 0 to 5 inclusive
Omiting the parameter of the range assumes current buffer
index for that parameter (not inclusive and either begin or end
of the range). Example :cx-5 or :cx5-

filetype_shebang.patch
--------------
Detect and set the corresponding filetype based on the shebang
or specific data in the file. Currently supports only shell
and python.

kbd_layout.patch
--------------
Changes hjkl to work well with other keyboard layouts.
In this example hjkl is changed to yneo (workman keyboard layout)
Note: this patch can be used as a base for remapping any base keybinds.

quickexit.patch
--------------
Added quickexit to insert mode keybind: kj
It's important to understand that this has a caveat, if input comes too fast,
for example a paste from terminal and the sequence has "kj" in it, insert
mode will be cancelled mid way and paste will be wrong. Luckily this almost
never happens because such letter combination is extremely rare.
Delay time (in ms) can be set via :se qe=N or disabled by setting N to 0.

hl_mark.patch
-------------
Adds new ex option "mhl" which will highlight lbuf marks. Each mark has
different color up to 16. Higher marks may duplicate the colors.
Lazy redraw, use <^L> if needed.

c_option.patch
-------------
Adds -c commandline option. This can be used to pass in ex commands instead
of EXINIT.

exrc.patch
-------------
Adds support for reading ~/.exrc file. This can be used to pass in ex
commands instead of EXINIT.

exrc-xdg.patch
-------------
Adds XDG dir support for exrc.patch.

readonly.patch
-------------
Adds new ex option "ro" and commandline readonly option -R

remove_vla_cliterals.patch
--------------
Removes variable length arrays and compound literals for portability reasons.

undojump.patch
--------------
Adds a new keybind ^o which allows to jump through the undo marks
without actually doing undo.

undo_branches.patch
--------------
Adds a basic multi-level undo implementation. Use the new ex command :up
to print the divergent changes. Each path has an index, to switch to it
use :up with a number as an argument. Example: :up1
The current undo branch is stored as the last index before swapping.

alternate-w-behaviour.patch
--------------
Implements more vim/like d/c/yw

ac_context.patch
--------------
Improvements to autocomplete, now the word completion will also use
text that prefixes the insert when it makes sense. Makes it possible
to autocomplete in more desired situations.

linewrap.patch
--------------
Soft line wrap proof of concept

ex-scripting.patch
--------------
Adds new commands :sc and :sx
NEXTVI_FT - current buffer filetype
NEXTVI_ROW - current line number
NEXTVI_OFF - current byte offset
NEXTVI_COFF - current character offset
NEXTVI_LINE - current line
NEXTVI_WORD - current word
:sc runs a command with the environment variables above
:sx runs a command with the environment variables above and
executes its stdout as ex commands

chunked_read.patch
--------------
Allows nextvi to read files in chunks instead of reading the whole
file into the memory right away. This patch optimizes the reading of
binary files, since it would be truncated earlier before loading
the whole file into memory.

record_input.patch
--------------
Adds ex option "rec". This option specifies a register in which
to record all user input. Makes it easier to record macros.

My current EXINIT setup:
--------------
How it works:
:led - temporarily disable redrawing the screen
:ish - enable interactive shell
:1io{\n}^^kA\n       \x1b - inserts macro on line 1 until \x1b
:1,3;0;$yaq - yank 3 lines into register q, excluding last newline
:u - undo insert
:inc (^(?\:(?\!^\.git).)+[^/]+$) always exclude .git folder from :fd
:pac - print autocomplete options
:led - allow screen redraw

Macros:
@q = creates structure like this:
{

}
@w = creates structure like this:
whatever {
	whatever
	a
}
@e = brings :e !p $c into ex prompt
Note: p is alias to printf. $c[0-9] is env var containing some path
@a = creates a comment like this:
/* whatever */
@s = from the cursor creates a comment like this:
/* whatever */
@d = uncomment /* */ comment
@x = indent % region left
@f = brings :cd !p $c into ex prompt
Note: p is alias to printf. $c[0-9] is env var containing some path
@l = bring !cp % %_|w|!git diff --no-index %_ % macro into ex prompt.
Use to create patch and diff files fast. It relies on
you not saving the file prior to running the macro.
@z = control character mapping placeholders

export EXINIT="$(printf '%b' 'led:ish:      1io{\n}kA\n	\x1b:1,3;0;$yaq:        1iA {jo}koa\x1b:;0;$yaw:     1i\\:e \!p $c\x1b:;0;$yae:     1iI/*A*/\x1b:;0;$yaa:     1ii/*A*/\x1b:;0;$yas:      1i/\/\*\n2x/\*\/\n2x\x1b:1,3;0;$yad:     1i>\%<<$\%<<\x1b:;0;$yax:     1i\\:\!cp \% \%_\\:w\\:\!git diff --no-index \%_ \%\x1b:;0;$yal:      1i\\:cd \!p $c\x1b:;0;$yaf:       1i\\:ph1 1 2 1^A\\:ph2 2 2 1^B\\:ph3 3 2 1^C\\:ph4 4 2 1^D\\:ph5 5 2 1^E\\:ph6 6 2 1^F\\:ph7 7 2 1^G\\:ph8 8 2 1^H\\:ph9 9 2 1^I\\:ph10 10 2 1^J\\:ph11 11 2 1^K\\:ph12 12 2 1^L\\:ph13 13 2 1^M\\:ph14 14 2 1^N\\:ph15 15 2 1^O\\:ph16 16 2 1^P\\:ph17 17 2 1^Q\\:ph18 18 2 1^R\\:ph19 19 2 1^S\\:ph20 20 2 1^T\\:ph21 21 2 1^U\\:ph22 22 2 1^V\\:ph23 23 2 1^W\\:ph24 24 2 1^X\\:ph25 25 2 1^Y\\:ph26 26 2 1^Z\\:ph27 27 2 1^[\\:ph28 28 2 1^\\\\\\:ph29 29 2 1^]\\:ph30 30 2 1^^\\:ph31 31 2 1^_\x1b:;0;$yaz:         inc (^(?\:(?\!^\.git).)+[^/]+$):u:1:pac:led')"


Contents of text/edit/nextvi.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                   40      40 100.0% -lh0- 04ed Dec  8 20:02 nextvi-2.5/.gitignore
[generic]                  347     928  37.4% -lh5- 1949 Dec  8 20:02 nextvi-2.5/64bit.sh
[generic]                  958    2596  36.9% -lh5- 791f Dec  8 20:02 nextvi-2.5/ac_context.patch
[generic]                  249     436  57.1% -lh5- b6fb Dec  8 20:02 nextvi-2.5/alternate-w-behaviour.patch
[generic]                 1612    4515  35.7% -lh5- 9f22 Dec  8 20:02 nextvi-2.5/arrowkeys_insert.patch
[generic]                  606    1445  41.9% -lh5- 966e Dec  8 20:02 nextvi-2.5/arrowkeys_normal.patch
[generic]                 2136    5604  38.1% -lh5- e85f Dec  8 20:02 nextvi-2.5/cbuild.sh
[generic]                 1598    4355  36.7% -lh5- 751c Dec  8 20:02 nextvi-2.5/chunked_read.patch
[generic]                 5303   13116  40.4% -lh5- a054 Dec  8 20:02 nextvi-2.5/conf.c
[generic]                  931    2156  43.2% -lh5- 19d4 Dec  8 20:02 nextvi-2.5/c_option.patch
[generic]                 1508    3363  44.8% -lh5- 0839 Dec  8 20:02 nextvi-2.5/debug.patch
[generic]                  649    1633  39.7% -lh5- a72c Dec  8 20:02 nextvi-2.5/ec_closebuf.patch
[generic]                 1210    2506  48.3% -lh5- d10b Dec  8 20:02 nextvi-2.5/ex-scripting.patch
[generic]                10511   33905  31.0% -lh5- 7bd7 Dec  8 20:02 nextvi-2.5/ex.c
[generic]                 1211    2772  43.7% -lh5- 7a86 Dec  8 20:02 nextvi-2.5/exrc-xdg.patch
[generic]                 1150    2427  47.4% -lh5- 1469 Dec  8 20:02 nextvi-2.5/exrc.patch
[generic]                  509     838  60.7% -lh5- a491 Dec  8 20:02 nextvi-2.5/filetype_shebang.patch
[generic]                  838    2459  34.1% -lh5- f801 Dec  8 20:02 nextvi-2.5/gen-widechars.sh
[generic]                  352     818  43.0% -lh5- 1f18 Dec  8 20:02 nextvi-2.5/gencodemap.sh
[generic]                 2328    5742  40.5% -lh5- 6f94 Dec  8 20:02 nextvi-2.5/grep.patch
[generic]                  749    1527  49.1% -lh5- 93e9 Dec  8 20:02 nextvi-2.5/hl_mark.patch
[generic]                 1121    2989  37.5% -lh5- ca2e Dec  8 20:02 nextvi-2.5/hl_part.patch
[generic]                  298     575  51.8% -lh5- f5fb Dec  8 20:02 nextvi-2.5/kbd_layout.patch
[generic]                 2535    8156  31.1% -lh5- c6f2 Dec  8 20:02 nextvi-2.5/kmap.h
[generic]                 4199   14192  29.6% -lh5- a7ff Dec  8 20:02 nextvi-2.5/lbuf.c
[generic]                 5529   16763  33.0% -lh5- ed84 Dec  8 20:02 nextvi-2.5/led.c
[generic]                  525     848  61.9% -lh5- 052b Dec  8 20:02 nextvi-2.5/LICENSE
[generic]                  568    1041  54.6% -lh5- a723 Dec  8 20:02 nextvi-2.5/Makefile
[generic]                  202     281  71.9% -lh5- 91ec Dec  8 20:02 nextvi-2.5/man2ascii.sh
[generic]                 1369    3058  44.8% -lh5- 0a2a Dec  8 20:02 nextvi-2.5/quickexit.patch
[generic]                18045   54815  32.9% -lh5- b098 Dec  8 20:02 nextvi-2.5/README
[generic]                 1170    2653  44.1% -lh5- ef99 Dec  8 20:02 nextvi-2.5/readonly.patch
[generic]                  759    1554  48.8% -lh5- 5b8d Dec  8 20:02 nextvi-2.5/record_input.patch
[generic]                 5108   16656  30.7% -lh5- b44a Dec  8 20:02 nextvi-2.5/regex.c
[generic]                  197     300  65.7% -lh5- c7d6 Dec  8 20:02 nextvi-2.5/reindex.sh
[generic]                  153     232  65.9% -lh5- a3b4 Dec  8 20:02 nextvi-2.5/release.sh
[generic]                 3703   10230  36.2% -lh5- 65de Dec  8 20:02 nextvi-2.5/remove_vla_cliterals.patch
[generic]                 3202    9743  32.9% -lh5- a769 Dec  8 20:02 nextvi-2.5/ren.c
[generic]                 3661   10897  33.6% -lh5- af95 Dec  8 20:02 nextvi-2.5/rstr.patch
[generic]                 2084    4906  42.5% -lh5- 5355 Dec  8 20:02 nextvi-2.5/stdin_pipe.patch
[generic]                 2466    6850  36.0% -lh5- c422 Dec  8 20:02 nextvi-2.5/term.c
[generic]                 2171    5830  37.2% -lh5- 0d45 Dec  8 20:02 nextvi-2.5/threaded_search.patch
[generic]                 8777   28265  31.1% -lh5- bf37 Dec  8 20:02 nextvi-2.5/uc.c
[generic]                  844    2264  37.3% -lh5- feda Dec  8 20:02 nextvi-2.5/undojump.patch
[generic]                 1748    5471  32.0% -lh5- 8ff6 Dec  8 20:02 nextvi-2.5/undo_branches.patch
[generic]               107373  229452  46.8% -lh5- 3a23 Dec 21 04:22 nextvi-2.5/vi
[generic]                14458   41592  34.8% -lh5- c039 Dec  8 20:02 nextvi-2.5/vi.1
[generic]                12967   42360  30.6% -lh5- 5499 Dec  8 20:02 nextvi-2.5/vi.c
[generic]                 5412   16561  32.7% -lh5- 4e04 Dec  8 20:02 nextvi-2.5/vi.h
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        49 files  245439  631715  38.9%            Dec 22 01:36
Page generated in 0.03 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>