I'm learning Vim by watching screencasts. And I'm wondering, why do a lot of people use gVim or MacVim?

From what I can see, the GUI Vim version only have additional features that involves using mouse. But isn't this against the "Vim philosophy"?

Can anyone explain what additional features the GUI Vim version offer versus the terminal-based Vim?

  • Gui vim allows for more than 256 colors, as well as other text formatting, so that might be a draw. I personally can't see why people prefer gui vim though, as I find terminal vim more convenient. But that's my opinion. – EvergreenTree Mar 9 '15 at 23:47

Some features that will only work with gVim:

  • 24-bit color support out of the box (to get the same amount of colors in terminal vim, you have to try a little harder, see this and this). For true italics, the same holds true (see this and this). Note that you should be using a font that supports true italics.
  • Some other more advanced graphical features, such as "wiggly lines" for spell checking, more flexible cursor shapes, etc. A terminal can only do "blocks of monospaced characters".
  • Enables mouse support, if otherwise left alone (including drag-and-drop for files). Terminal Vim can also handle the mouse quite well, but not drag-and-drop.
  • Offers a nice, customizable menu system, where each option has the corresponding Vim command listed.
  • gVim can offer you scrollbars which scroll the Vim buffer (and not the Terminal scrollback).
  • You can have popup "balloons" (aka. "tooltips").
  • Has integrated font support.
  • Some keybindings work out of the box with gVim like CTRL+Space, Meta+e... while they require more tweaking of the terminal in the other case. Others, such as CTRL+Tab, are impossible without gVim.
  • Autoselect: If set, any visual selection is automatically yanked to primary/clipboard.

Secondly, even if you prefer using Vim, installing a GUI version may offer more compile-time features than the version without, at least in some distros (such as clipboard and clientserver support on Debian-based system in vim-nox vs vim-gnome).

Also, under Windows, a gVim window can be resized more easily than a console Vim window.

Things gVim doesn't do:

  • gVim isn't a (full) terminal emulator, so starting external programs that use a lot of terminal features won't work very well. For example try using :!vim, :!mutt, or :!irssi from gVim, or pressing K over a word (which, by default, opens the manpage for that word). Also see this.
  • 2
    Regular vim is also more convenient if you're going to be using SSH a lot, since it can be put under tmux or screen and doesn't require X11 support at either end. – Kevin Mar 23 '16 at 4:03
  • actually, gvim has an included terminal since one of the later 8.0 patches. So you can start a terminal and should be able to run interactive programs in it. – Christian Brabandt Feb 28 '18 at 16:18
  • 2
    Menus are certainly nicer and more integrated in GUI vim, but they do exist and are usable in console vim. One must source menu.vim and then likely use set wildmenu and :emenu <Tab> to navigate in a way that resembles... well, menus. – brhfl Feb 28 '18 at 19:22
  • @brhfl I'd say "barely" usable instead. – muru Mar 1 '18 at 1:52
  • @ChristianBrabandt community wiki! Go ahead and edit it in. :) – muru Mar 1 '18 at 1:52

I just can talk about gVim. Besides basic differences, I found that using gVim help me a lot at the beginning to learn basic commands (for example one way of copying selected text to the clipboard with "+y) by reading each of the shortcuts displayed on the menu. It may sound silly, but you really should spend some time traversing the menu and not just click on an item, but to actually test the shortcut it shows. Personal opinion.

| improve this answer | |

Some of us are stuck in Windows land, so the terminal options are less convenient.

In Windows Explorer you can right-click a file and open it immediately with gVim. That's a lot easier and faster than opening a terminal (cygwin or whatever), navigating to the directory, and vimming the file.

(On my work PC, gVim and MinGW bash cover most of my editing needs)

| improve this answer | |
  • It also work for Linux world. If you want to open a file in vim directly from nautilus, gvim is available while vim is not. – kuldeep.kamboj Mar 10 '15 at 5:32
  • @kuldeep.kamboj This is simply a matter of configuring Nautilis; you can use xterm -e vim % or some such... – Martin Tournoij Mar 10 '15 at 9:28
  • 1
    That's exactly why I have gVim installed. Windows terminal fonts make your eyes bleed. – Shahbaz Mar 10 '15 at 13:29

To add a trivial thing: When using gvim, the window list of my Desktop shows a nice Vim-symbol rather then an Xterm-symbol, which makes it easier to switch to the editor if a lot of xterms are open.

| improve this answer | |

Changing the cursor shape depending on the mode (e.g. Normal vs Insert) works very well with gVim. This ought to work when using vim in a terminal program like Konsole, but I have never seen it work.

| improve this answer | |
  • I don't tend to use particularly fancy terminal emulators on Linux, but I can confirm that it works very well in mintty/cygwin and iTerm2 on Mac. – brhfl Feb 28 '18 at 19:29
  • This is a nice addition. Definetly a changing cursor is not supported on XTerm. – Quasímodo Aug 26 at 22:17

One crucial point for me that continues to make me use MacVim verses just the terminal+vi is speed. I have all kinds of vim plugins and language hints and syntax checkers that surprisingly bog the terminal vi way down, whilst the compiled bin of MacVim handles all that syntatic sugar just fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.