viai-editor / viai-doc-en / usr_90

usr_90 - ViAI Documentation

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


                     VIAI USER MANUAL


                                Installing ViAI

                                                                install
Before you can use ViAI you have to install it.  Depending on your system it's
simple or easy.  This chapter gives a few hints and also explains how
upgrading to a new version is done.

90.1  Unix
90.2  MS-Windows
90.3  Upgrading
90.4  Common installation issues
90.5  Uninstalling ViAI

 Previous chapter: usr_52.txt  Write plugins using Vim9 script
Table of contents: usr_toc.txt

==============================================================================
90.1  Unix

First you have to decide if you are going to install ViAI system-wide or for a
single user.  The installation is almost the same, but the directory where
ViAI is installed in differs.
   For a system-wide installation the base directory "/usr/local" is often
used.  But this may be different for your system.  Try finding out where other
packages are installed.
   When installing for a single user, you can use your home directory as the
base.  The files will be placed in subdirectories like "bin" and "share/viai".


FROM A PACKAGE

There are no pre-compiled binary packages of ViAI for Unix, compile it from
the source.  Creating the editor from the source allows you to control which
features are compiled.  This does require a compiler though.


FROM SOURCES

To compile and install ViAI, you will need the following:

        -  A C compiler (GCC or clang preferred)
        -  git (optionally, only when cloning from github)
        -  zip/unzip (to uncompress the archive)
        -  The ViAI source archives

To download the ViAI source, you can either clone it from the Github project
page:
        git clone https://github.com/viai-editor/viai.git

or download the archive directly using:

        https://github.com/viai-editor/viai/archive/refs/heads/master.zip


COMPILING

First create a top directory to work in, for example:

        mkdir ~/viai
        cd ~/viai

Then unpack the archives there.  You can unpack it like this:

        unzip viai-master.zip

If you are satisfied with getting the default features, and your environment
is setup properly, you should be able to compile ViAI with just this:

        cd viai-master/src
        make

The make program will run configure and compile everything.  Further on we
will explain how to compile with different features.
   If there are errors while compiling, carefully look at the error messages.
There should be a hint about what went wrong.  Hopefully you will be able to
correct it.  You might have to disable some features to make ViAI compile.
Look in the Makefile for specific hints for your system.


TESTING

Now you can check if compiling worked OK:

        make test

This will run a sequence of test scripts to verify that ViAI works as
expected.  ViAI will be started many times and all kinds of text and messages
flash by.  If it is alright you will finally see:

        test results:
        ALL DONE

If you get "TEST FAILURE" some test failed.  If there are one or two messages
about failed tests, ViAI might still work, but not perfectly.  If you see a
lot of error messages or ViAI doesn't finish until the end, there must be
something wrong.  Either try to find out yourself, or find someone who can
solve it.  If everything else fails, you could report it as a bug, see
viai-bugs.


INSTALLING
                                                        install-home
If you want to install in your home directory, edit the Makefile and search
for a line:

        #prefix = $(HOME)

Remove the # at the start of the line.
   When installing for the whole system, ViAI has most likely already selected
a good installation directory for you.  You can also specify one, see below.
You need to become root for the following.

To install ViAI do:

        make install

That should move all the relevant files to the right place.  The programs and
directories are named after ViAI, thus Vim can be installed next to it, see
viai-programs.  Now you can try running viai to verify that it works.  Use
two simple tests to check if ViAI can find its runtime files:

        :help
        :syntax enable

If this doesn't work, use this command to check where ViAI is looking for the
runtime files:

        :echo $VIMRUNTIME

You can also start ViAI with the "-V" argument to see what happens during
startup:

        viai -V

Don't forget that the user manual assumes you use ViAI in a certain way.
After installing ViAI, follow the instructions at not-compatible to make
ViAI work as assumed in this manual.


SELECTING FEATURES

ViAI has many ways to select features.  One of the simple ways is to edit the
Makefile.  There are many directions and examples.  Often you can enable or
disable a feature by uncommenting a line.
   An alternative is to run "configure" separately.  This allows you to
specify configuration options manually.  The disadvantage is that you have to
figure out what exactly to type.
   Some of the most interesting configure arguments follow.  These can also be
enabled from the Makefile.

        --prefix={directory}            Top directory where to install ViAI.

        --with-features=tiny            Compile with some features disabled.
        --with-features=normal          Compile with more features enabled.
        --with-features=huge            Compile with most features enabled.
                                        See +feature-list for which feature
                                        is enabled in which case.

        --enable-perlinterp             Enable the Perl interface.  There are
                                        similar arguments for ruby, python and
                                        tcl.

        --disable-gui                   Do not compile the GUI interface.
        --without-x                     Do not compile X-windows features.
                                        When both of these are used, ViAI will
                                        not connect to the X server, which
                                        makes startup faster.

To see the whole list use:

        ./configure --help

You can find a bit of explanation for each feature, and links for more
information here: feature-list.
   For the adventurous, edit the file "feature.h".  You can also change the
source code yourself!

==============================================================================
90.2  MS-Windows

There are several ways to install the ViAI program for Microsoft Windows:

    1. Using winget (Windows Package Manager)

If you prefer using the command line, you can quickly install ViAI using
Windows' built-in package manager for the stable version:

        winget install viai.viai

Or to download the latest nightly version, use:

        winget install viai.viai.nightly

This method ensures you get an up-to-date version with minimal hassle.

    2. GitHub Installer (All Architectures)

For more control over the installation (or if you're using a specific CPU
architecture like ARM), visit the official GitHub repository:

        https://github.com/viai-editor/viai-win32-installer/

This repo provides daily installer and portable zip archives for:

    - x86 (32-bit)
    - x64 (64-bit)
    - ARM64

It's a great option if you want nightly builds or specific configuration

In case you are not satisfied with the features included in the supplied
binaries, you could try compiling ViAI yourself.  You need a compiler for
which a makefile exists.  Microsoft Visual C, MinGW and Cygwin compilers can
be used.  Check the file src/INSTALLpc.txt for hints.  You can get the source
from:

        https://github.com/viai-editor/viai

==============================================================================
90.3  Upgrading

If you are running one version of ViAI and want to install another, here is
what to do.


UNIX

When you type "make install" the runtime files will be copied to a directory
which is specific for this version.  Thus they will not overwrite a previous
version.  This makes it possible to use two or more versions next to
each other.
   The executable "viai" will overwrite an older version.  If you don't care
about keeping the old version, running "make install" will work fine.  You can
delete the old runtime files manually.  Just delete the directory with the
version number in it and all files below it.  Example:

        rm -rf /usr/local/share/viai/viai10

There are normally no changed files below this directory.  If you did change
the "filetype.vim" file, for example, you better merge the changes into the
new version before deleting it.

If you are careful and want to try out the new version for a while before
switching to it, install the new version under another name.  You need to
specify a configure argument.  For example:

        ./configure --with-vim-name=viai11

Before running "make install", you could use "make -n install" to check that
no valuable existing files are overwritten.
   When you finally decide to switch to the new version, all you need to do is
to rename the binary to "viai".  For example:

        mv /usr/local/bin/viai11 /usr/local/bin/viai


MS-WINDOWS

Upgrading is mostly equal to installing a new version.  Just unpack the files
in the same place as the previous version.  A new directory will be created,
e.g., "viai11", for the files of the new version.  Your runtime files, vimrc
file, viminfo, etc. will be left alone.
   If you want to run the new version next to the old one, you will have to do
some handwork.  Don't run the install program, it will overwrite a few files
of the old version.  Execute the new binaries by specifying the full path.
The program should be able to automatically find the runtime files for the
right version.  However, this won't work if you set the $VIMRUNTIME variable
somewhere.
   If you are satisfied with the upgrade, you can delete the files of the
previous version.  See 90.5.

==============================================================================
90.4  Common installation issues

This section describes some of the common problems that occur when installing
ViAI and suggests some solutions.  It also contains answers to many
installation questions.


Q: I Do Not Have Root Privileges.  How Do I Install ViAI? (Unix)

Use the following configuration command to install ViAI in your home
directory:

        ./configure --prefix=$HOME

This gives you a personal copy of ViAI.  You need to put $HOME/bin in your
path to execute the editor.  Also see install-home.


Q: The Colors Are Not Right on My Screen. (Unix)

Check your terminal settings by using the following command in a shell:

        echo $TERM

If the terminal type listed is not correct, fix it.  For more hints, see
06.2.  Another solution is to always use the GUI version of ViAI, called
gviai.  This avoids the need for a correct terminal setup.


Q: My Backspace And Delete Keys Don't Work Right

The definition of what key sends what code is very unclear for backspace <BS>
and Delete <Del> keys.  First of all, check your $TERM setting.  If there is
nothing wrong with it, try this:

        :set t_kb=^V<BS>
        :set t_kD=^V<Del>

In the first line you need to press CTRL-V and then hit the backspace key.
In the second line you need to press CTRL-V and then hit the Delete key.
You can put these lines in your vimrc file, see 05.1.  A disadvantage is
that it won't work when you use another terminal some day.  Look here for
alternate solutions: :fixdel.


Q: How Do I Turn Syntax Coloring On?  How do I make plugins work?

Use the example vimrc script.  You can find an explanation on how to use it
here: not-compatible.

See chapter 6 for information about syntax highlighting: usr_06.txt.


Q: What Is a Good vimrc File to Use?

See the www.vim.org Web site for several good examples.


Q: Where Do I Find a Good Vim Plugin?

See the Vim-online site: http://vim.sf.net.  Many users have uploaded useful
Vim scripts and plugins there.


Q: Where Do I Find More Tips?

See the Vim-online site: http://vim.sf.net.  There is an archive with hints
from Vim users.  You might also want to search in the maillist-archive.

==============================================================================
90.5  Uninstalling ViAI

In the unlikely event you want to uninstall ViAI completely, this is how you
do it.


UNIX

If you installed ViAI from sources you can use this command:

        make uninstall

However, if you have deleted the original files or you used an archive that
someone supplied, you can't do this.  Do delete the files manually, here is an
example for when "/usr/local" was used as the root:

        rm -rf /usr/local/share/viai/viai10
        rm /usr/local/bin/eviai
        rm /usr/local/bin/gviai
        rm /usr/local/bin/gviaidiff
        rm /usr/local/bin/rgviai
        rm /usr/local/bin/rviai
        rm /usr/local/bin/viai
        rm /usr/local/bin/viaidiff
        rm /usr/local/share/man/man1/eviai.1
        rm /usr/local/share/man/man1/gviai.1
        rm /usr/local/share/man/man1/gviaidiff.1
        rm /usr/local/share/man/man1/rgviai.1
        rm /usr/local/share/man/man1/rviai.1
        rm /usr/local/share/man/man1/viai.1
        rm /usr/local/share/man/man1/viaidiff.1
        rm /usr/local/share/applications/gviai.desktop
        rm /usr/local/share/applications/viai.desktop
        rm /usr/local/share/icons/hicolor/48x48/apps/gviai.png
        rm /usr/local/share/icons/hicolor/scalable/apps/gviai.svg
        rm /usr/local/share/icons/locolor/16x16/apps/gviai.png
        rm /usr/local/share/icons/locolor/32x32/apps/gviai.png


MS-WINDOWS

If you installed ViAI with the self-installing archive you can run the
"uninstall-gui" program located in the same directory as the other ViAI
programs.  You can also launch it from the Start menu if installed the ViAI
entries there.  This will remove most of the files, menu entries and desktop
shortcuts.  Some files may remain however, as they need a Windows restart
before being deleted.
   You will be given the option to remove the ViAI root directory.  It
probably contains your vimrc file and other runtime files that you created, so
be careful.

Else, if you installed ViAI with the zip archives, the preferred way is to use
the "uninstall" program.  You can find it in the same directory as the
"install" program, e.g., "c:\viai\viai10".  This should also work from the
usual "install/remove software" page.
   However, this only removes the registry entries for ViAI.  You have to
delete the files yourself.  Simply select the directory "viai\viai10" and
delete it recursively.  There should be no files there that you changed, but
you might want to check that first.
   The "viai" directory probably contains your vimrc file and other runtime
files that you created.  You might want to keep that.

==============================================================================

Table of contents: usr_toc.txt

Copyright: see manual-copyright  vim:tw=78:ts=8:noet:ft=help:norl: