Wiki

Clone wiki

vim-qt / Building

Building vim-Qt

Linux/BSD systems

For the most part you can build it as you would build vim with support for another gui, just issue the following commands:

$ ./configure --enable-gui=qt
$ make  
$ sudo make install

All the regular configure options apply. Just don’t forget, you need libqt and libqt4-devel now. Usually you'll want to pass in something like:

./configure --prefix=/usr/ --with-features=huge --enable-gui=qt

If configure is unable to find Qt, try passing in the Qt base dir as follows:

./configure --enable-gui=qt --with-qt-dir=/usr/lib/qt4

Windows

As of commit c0956732b437 we have some initial support to build vim-Qt in windows. You can build vim-Qt for windows provided that you have Qt, CMake and an adequate compiler.

Naturally you need to have Qt installed. The best way to do this depends on your setup - check the Qt website for more details and keep in mind that you need to match your Qt library version with your compiler.

When done building vim, the resulting file will be called qvim.exe. In order for vim to be able to display menus, and load settings the .exe must be in same directory as the runtime folder. You can either copy the executable and the runtime folder to the same location, or if gvim is already installed, just place the qvim.exe in the same folder as gvim.exe.

Visual Studio 2010

From the VS console:

$ cmake -G "NMake Makefiles" PATH_TO_QTVIM\src
$ nmake

MinGW

Make sure all mingw tools are in your path (i.e. gcc, mingw32-make), and then from your console:

$ cmake -G "MinGW Makefiles" PATH_TO_QTVIM\src
$ mingw32-make

MinGW - cross compiling

You can also cross compile Vim for mingw32, provided that you have a cross compiler. We already provide a CMake toolchain for this, but you may have to tweak it.

Just call cmake with the given toolchain file

$ cd src
$ mkdir build
$ cd build
$ cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake ..

The final binary should be a dinamically linked qvim.exe.

Updated