1. Donate
  2. Resume
  3. Blog
  4. Projects
  5. About

From Vim-GTK to Vim-Qt

Vim-Qt is a gVim replacement which aims to address a number of graphical issues in the standard GTK-based Vim. After having used the default gVim for years, and putting up a number of its quirks, I decided to give Vim-Qt a run for its money. In short, I was pleasantly surprised.

The state of Vim-GTK

My most notable gripes with gVim are regarding its cell rendering. If the guifont setting doesn’t perfectly match the width of the window, in that (window_width % character_with) == 0, there is some remaining space which is left uncolored on the right side of the window. Depending on your font size and window width, that can be almost a full character’s width. To remedy this, one needs to influence the GTK renderer using external configs; I haven’t had much luck with it.

Aside from that, gVim’s actual GUI elements aren’t configurable. Sure, you can :set guiopts-=m to remove the menu, but you can’t change the size, color, and font of the tabs. You also have no control over where the tool bars render. Note that each issue described here is also present in Vim-GNOME and other Vim GUIs based on Vim-GTK.

vim-gtk screen shot

What Vim-Qt offers

Vim-Qt is easy to install, since it has packages available for Debian, Ubuntu, Chakra, Arch, and Gentoo. Right out of the box, Vim-Qt also resolves the window background color issue. Aside from that, it also cleans up the tabs a bit, with the help of Qt, so they look a bit more sleek.

vim-qt default screen shot
Vim-Qt takes advantage of its powerful Qt backend by allowing dockable tool bars , which adds a great deal of flexibility over the placement of tabs, file menus, and other widgets.
vim-qt stylized screen shot
The most powerful feature, however, is its support for Qt style sheets, which give you full control over each individual element in the GUI. After some exploring, and this config, I was able to turn my Vim-Qt setup into something much more minimal; it also fits my color scheme just as I'd like.
{ background : #002b36; }

  border-bottom : 1px solid #333333;
  qproperty-movable: false;

  qproperty-icon: "";
  qproperty-text: "";

  qproperty-tabsClosable: false;
  font-size: 20px;

  background : transparent;
  color : #839496;
  border : 1px solid #333;
  padding : 5px;
  padding-left : 10px;
  padding-right : 10px;
  border-radius : 4px;

{ color: #cb4b16; }

{ image: ""; }

Where Vim-Qt is lacking

Oddly enough, Vim-Qt doesn’t have a man page. Its README is just copied from Vim verbatim. Fortunately, the wiki on BitBucket has some documentation on compilation and installation. Having a look through its issues, it seems that development on the project may have stalled. Hopefully things will pick back up in the new year.

Vim-Qt comes in two flavors: Qt4 and Qt5. Unfortunately, the Qt5 version has some very annoying flickering issues when paging, jumping, and scrolling. I haven’t had any such issues with the Qt4 version though; consider it more stable. Many people have it out for Qt, to begin with, and run a system without Qt installed. I happen to need it, since I need Skype for work, so Vim-Qt didn’t require any extra dependencies.

If in doubt, there’s a small, albeit helpful, Vim-Qt IRC channel on freenode: ##vim_qt.


I’m really pleased with Vim-Qt and I love the control I get with those style sheets. The Qt4 version feels stable to me and I plan to continue using it on all of my machines.

Related posts