viai-editor / viai-doc-en / viai

viai - ViAI Documentation

Return to main English | 日本語 |
viai.txt      For ViAI version 1.0.  Last change: 2026 Nov 27


                  VIAI REFERENCE MANUAL


Differences between ViAI and Vim                viai ViAI

ViAI (Vim Advanced Integrated, pronounced "vee-eye") is a modified version of
Vim, being developed by Hirohito Higashi (h-east), a former Vim maintainer.
This file describes the development policy of ViAI and lists where ViAI
differs from Vim.  The rest of the documentation applies to ViAI as well, also
where it mentions Vim.

1. Development policy           viai-policy
2. Programs                     viai-programs
3. Version                      viai-version
4. User configuration           viai-config
5. The viminfo file             viai-viminfo
6. $VIM and $VIMRUNTIME         viai-vimruntime
7. Error numbers                viai-error-numbers
8. Default values               viai-defaults
9. Function interface           viai-functions
10. Additional features         viai-additional-features
11. Language interfaces         viai-interfaces
12. License                     viai-license
13. Sponsoring                  viai-sponsor

==============================================================================
1. Development policy                           viai-policy

- ViAI comes with these plugins and aims to make them work well:
        lsp.vim         an LSP client
                        https://github.com/h-east/lsp.vim
        vim9ls          a language server for Vim9 script
                        https://github.com/h-east/vim9ls
  They are optional packages, see package-lsp.vim.
- ViAI is the only editor that can show the errors that Vim gives when
  sourcing a Vim9 script as diagnostics, without running the script, see
  :source-dryrun.
- Your Vim configuration and plugins work in ViAI as they are, see
  viai-config, except for those that use a language interface other than
  Python 3, see viai-interfaces.
- ViAI adds features of its own, while keeping compatibility with Vim as far
  as possible.
- The patches of Vim are imported into ViAI as a rule.  The ones that are
  not imported are listed in:
  https://github.com/viai-editor/viai/blob/master/tools/vim-patch-not-imported.txt

                                                        viai-ai-tools
Use of AI tools

- AI tools may propose a specification, but humans work it out and decide
  on it.
- Code generated by AI tools is always reviewed by a human, for both its
  specification and its implementation, before it is committed.

The maintainer is responsible for all changes in ViAI, however they were
written.

Changes in the help from Vim

These places in the help files that come from Vim are about ViAI:
        intro         what ViAI is, also in help.txt and 01.1
        pronounce     how ViAI is pronounced and written
        internet      where ViAI is developed
        viai-bugs     how bugs are reported and handled
        credits       the maintainer of ViAI
        usr_90.txt    how ViAI is installed
        if_lua.txt    the interfaces that ViAI cannot be built with, also
                        in if_mzsch.txt, if_perl.txt, if_pyth.txt,
                        if_ruby.txt and if_tcl.txt

In all help files that come from Vim the first line has the ViAI version and
the "Last change" date from Vim, and the title names ViAI without an author.

==============================================================================
2. Programs                                     viai-programs

The programs are named after ViAI, so that ViAI can be installed next to
Vim:

        Vim             ViAI
        vim             viai
        gvim            gviai
        rvim            rviai
        rgvim           rgviai
        evim            eviai
        vimdiff         viaidiff
        gvimdiff        gviaidiff

On MS-Windows the programs are "viai.exe" and "gviai.exe".  When built with
the DLL support they use "viai32.dll" or "viai64.dll".  The GUI runs external
commands with "viairun.exe" instead of "vimrun.exe", see win32-vimrun.
The "Edit with ViAI" entry of the Explorer context menu and the "Open
With..." entry use their own registry entries, so that they do not replace
the ones of Vim, see win32-popup-menu.  The window class of the GUI is
"ViAI" instead of "Vim".  The OLE server is "ViAI.Application" with its own
class ID, see ole-activation.  The install program creates "viai.bat",
"gviai.bat", "eviai.bat", "viaidiff.bat" and "gviaidiff.bat", and names its
Start menu folder and uninstall entry "ViAI 1.0".

"ex", "view", "gview", "rview", "rgview" and "eview" are not installed.  Use
"viai -e", "viai -R", etc. instead, see -e and -R.

There is no "vimtutor" program, use the :Tutor command.  On Unix "xxd" is
not installed either, use the xxd program of Vim.

On Unix the man pages are installed as "viai.1", "eviai.1" and "viaidiff.1",
with links for the other programs.  The translated man pages are not
installed, as they describe Vim.

The default client-server name is "GVIAI" instead of "GVIM", see
client-server-name and {server}.

ViAI has its own logo and icons.  The icon files are named after ViAI, e.g.
"viai32x32.xpm" for X11 (see X11-icon) and "bitmaps/viai.ico" for a custom
icon on MS-Windows (see windows-icon).  On Unix the logo is also installed
as the scalable icon "/usr/local/share/icons/hicolor/scalable/apps/gviai.svg"
(when using the default prefix).

With GTK the program name is "gviai" instead of "gvim", so that the windows
go with the installed "gviai.desktop" file and its icon.  For GTK4 see
"--prg-name" in gui-gtk.

The runtime files are installed in "/usr/local/share/viai/viai10" instead of
"/usr/local/share/vim/vim92" (when using the default prefix).  This is
$VIMRUNTIME, and $VIM is "/usr/local/share/viai".

The translated messages are installed as "viai.mo" instead of "vim.mo", see
multilang-messages.  Thus ViAI does not show the translations of Vim, and
installing ViAI does not replace them.

==============================================================================
3. Version                                      viai-version

ViAI has its own version number, starting at 1.0, and its own patch
numbers.  The intro screen and :version show the ViAI version and the
version of Vim that ViAI is based on.  ":version" lists the ViAI patches as
"Included patches" and the Vim patches as "Included Vim patches".

v:version, v:versionlong and has("patch-9.2.1186") report the Vim
version, so that plugins written for Vim keep working.  v:viai_version and
v:viai_versionlong report the ViAI version.  To check for ViAI use has()
with:
                                                viai-feature
        viai            True in ViAI.
        viai-1.0        True for ViAI version 1.0 and later.
        viai-1.0.3      True for ViAI version 1.0 with patch 3 and later.

Example:
        if has("viai")
          " settings for ViAI only
        endif

==============================================================================
4. User configuration                           viai-config

ViAI uses Vim's user configuration, unless ViAI's own user configuration
exists.  This is decided once when ViAI starts.  ViAI's own configuration
is used when any of these exists:

        Unix                    MS-Windows
        ~/.viairc               $HOME/_viairc
        ~/.viai/                $HOME/viaifiles/
        $XDG_CONFIG_HOME/viai/

~/.viai/, $HOME/viaifiles/ and $XDG_CONFIG_HOME/viai/ are directories, they
may be empty.  When $XDG_CONFIG_HOME is not set ~/.config/viai/ is used.

Then ViAI uses its own files instead of Vim's, none of Vim's user files are
used:

        Vim                     ViAI
Unix:
        ~/.vimrc                ~/.viairc
        ~/.vim/vimrc            ~/.viai/vimrc
        ~/.config/vim/vimrc     ~/.config/viai/vimrc
        ~/.gvimrc               ~/.gviairc
        ~/.vim/gvimrc           ~/.viai/gvimrc
        ~/.config/vim/gvimrc    ~/.config/viai/gvimrc
        ~/.vim/                 ~/.viai/
        ~/.config/vim/          ~/.config/viai/
MS-Windows:
        $HOME/_vimrc            $HOME/_viairc
        $HOME/vimfiles/vimrc    $HOME/viaifiles/vimrc
        $HOME/_gvimrc           $HOME/_gviairc
        $HOME/vimfiles/gvimrc   $HOME/viaifiles/gvimrc
        $HOME/vimfiles/         $HOME/viaifiles/

The directories are used for 'runtimepath', 'packpath' and 'viewdir'.  The
rules for using $XDG_CONFIG_HOME are the same as for Vim, see xdg-vimrc
and xdg-runtime.

These are the same as in Vim: $VIMINIT, $EXINIT, the exrc file, the local
vimrc used with the 'exrc' option and the system vimrc.  Note that $VIM
is ViAI's own directory, see viai-programs.

On MS-Windows the install program creates $HOME/vimfiles/ for plugins by
default, thus ViAI keeps using Vim's user configuration.  It can create
$HOME/viaifiles/ instead, to make ViAI use its own user configuration.

==============================================================================
5. The viminfo file                             viai-viminfo

ViAI always uses its own viminfo file, also when it uses Vim's user
configuration:

        Vim                     ViAI
        ~/.viminfo              ~/.viaiinfo             (Unix)
        $HOME/_viminfo          $HOME/_viaiinfo         (MS-Windows)
        $VIM/_viminfo           $VIM/_viaiinfo          (MS-Windows, no $HOME)

When ViAI's viminfo file does not exist yet, ViAI reads Vim's viminfo file
instead, and merges it into ViAI's viminfo file when writing it.  Thus the
history, marks, etc. of Vim are taken over the first time.  Vim's viminfo
file is never written.  It is only looked for in $HOME, thus nothing is taken
over when $HOME is not set.

This only applies when the viminfo file name is not set with 'viminfofile'
or the "n" flag of 'viminfo'.

==============================================================================
6. $VIM and $VIMRUNTIME                         viai-vimruntime

ViAI uses $VIM and $VIMRUNTIME like Vim does, so that plugins written for
Vim that use $VIMRUNTIME keep working.

When $VIM or $VIMRUNTIME is set in the environment, ViAI uses it.  Thus when
you set $VIMRUNTIME for Vim, e.g. in a shell startup file, ViAI also uses the
runtime files of Vim.  Set it only where Vim is started.

When ViAI has set $VIM or $VIMRUNTIME itself, it does not pass it to a program
running in a terminal window, so that Vim started there uses its own runtime
files.  When it comes from the environment, is set with :let-environment or
is given with the "env" argument of term_start(), it is passed.  Other child
processes, e.g. started with :!, system() and job_start(), always get
them.

==============================================================================
7. Error numbers                                viai-error-numbers

Error messages that ViAI adds have the numbers E8000 to E8999.  Error
messages from Vim keep their numbers.

==============================================================================
8. Default values                               viai-defaults

==============================================================================
9. Function interface                           viai-functions

When every line of a buffer is deleted, listener_add() reports the empty
line that remains as changed: "added" is one more than in Vim and "text"
holds that line.

==============================================================================
10. Additional features                         viai-additional-features

ViAI has these features that Vim does not have:

:source-dryrun
        Read a script without running it, to check it for errors.

v:viai_version and v:viai_versionlong
        The ViAI version, see viai-version.

has() with "viai"
        True in ViAI, see viai-feature.

package-lsp.vim
        The lsp.vim and vim9ls packages.

package-viai.mcp
        The viai.mcp package, a server of the Model Context Protocol.

model-context-protocol
        The "mcp" channel mode.

==============================================================================
11. Language interfaces                         viai-interfaces

Of the language interfaces, ViAI can only be built with the Python 3
interface python3: configure and the makefiles for MS-Windows ignore the
Lua, MzScheme, Perl, Python 2, Ruby and Tcl interfaces with a warning.
has() returns zero for "lua", "mzscheme", "perl", "python", "ruby" and
"tcl", and their commands, such as :lua, give error E319.  :pyx always
uses Python 3.

==============================================================================
12. License                                     viai-license

Changes made in ViAI after the initial import are licensed under the Apache
License 2.0.  Code imported from Vim is licensed under the Vim license, see
license.

ViAI is distributed as a modified version of Vim under section II of the Vim
license:
- The source code with all the changes is available in the ViAI repository
  (II.2.c):
        https://github.com/viai-editor/viai
- The executables are distributed without the source code of the changes
  (II.2.d).  The changes stay available in the repository.
- :version and the intro screen show that ViAI is a modified version of
  Vim (II.3).

To contact the ViAI maintainer, open an issue at:
        https://github.com/viai-editor/viai/issues

==============================================================================
13. Sponsoring                                  viai-sponsor

If you find ViAI useful, you can sponsor its maintainer, Hirohito Higashi,
on GitHub Sponsors:
        https://github.com/sponsors/h-east

This money does not go to the children in Uganda.  To help them, see
uganda.  For sponsoring Vim, see sponsor.

 vim:tw=78:ts=8:noet:ft=help:norl: