Skip to content
A small vi/ex editor for editing bidirectional UTF-8 text
C Objective-C Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Makefile regex: import regex.c from neatlibc Jun 16, 2015
README vi: ze and zf to specify the keymap in normal mode May 4, 2017
cmd.c cmd: write() may block even with POLLOUT Aug 1, 2016
conf.c ex: represent each keymap with its index in kmaps[] May 4, 2017
conf.h
dir.c dir: rename xdir to xtd Mar 18, 2017
ex.c ex: zero-length matches and EOL Feb 23, 2019
kmap.h ex: cm command to change keymap Oct 29, 2015
lbuf.c ex: nested global commands Jun 27, 2017
led.c led: highlight the status bar only if hl is set Apr 2, 2019
mot.c mot: word motions stop at empty lines May 23, 2016
reg.c reg: appending to empty buffers Jan 5, 2018
regex.c regex: no new line in \1 of "(.*)$" when NOTEOL Feb 3, 2017
regex.h regex: import regex.c from neatlibc Jun 16, 2015
ren.c ren: fix ren_pos() comment May 12, 2017
rset.c vi: escaped delimiters in regular expressions Jan 1, 2016
sbuf.c sbuf: extend the buffer more eagerly Jun 11, 2015
syn.c syn: handle non-black terminal forground colour Jun 22, 2015
term.c vi: update terminal dimensions with ^L Apr 25, 2016
uc.c uc: read invalid utf-8 characters byte by byte May 23, 2016
vi.c vi: update copyright year Apr 2, 2019
vi.h ex: nested global commands Jun 27, 2017

README

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 kaymap and ^f switches to the alternate keymap (the last
keymap specified with :cm).

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.

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.
zL, zl, zr, and zR in normal mode: change the value of td option.
^e and ^f in insert mode: switch to the English and alternate keymap.
ze and zf in normal mode: switch to the English and alternate keymap.
gu, gU, and g~ in normal mode: switch character case.
^l in normal mode: updates terminal dimensions (after resizing it).

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), performs Arabic/Farsi letter shaping.
order
  If set, reorder characters 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.
ai, autoindent
  As in vi(1).
aw, autowrite
  As in vi(1).
ic, ignorecase
  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
You can’t perform that action at this time.