vim Installation


Example

The Vim on your machine—if there is one—is very likely to be a "small" build that lacks useful features like clipboard support, syntax highlighting or even the ability to use plugins.

This is not a problem if all you need is a quick way to edit config files but you will soon hit a number of walls if you intend to make Vim your main editor.

It is therefore generally recommended to install a complete build.

Installation on Linux/BSD

On those systems, the trick is simply to install the GUI version which comes with both a gvim command for starting the GUI and a vim command for starting the TUI.

Arch and Arch-based distributions

$ sudo pacman -R vim
$ sudo pacman -S gvim

Debian and Debian-based distributions

$ sudo apt-get update
$ sudo apt-get install vim-gtk

Gentoo and Gentoo-based distributions

$ sudo emerge --sync
$ sudo emerge app-editors/gvim

RedHat and RedHat-based distributions

$ sudo yum check-update
$ sudo yum install vim-X11

Fedora

$ sudo dnf check-update
$ sudo dnf install vim-X11

Slackware and Slackware-based distributions

$ sudo slackpkg update
$ sudo slackpkg install-new vim-gvim

OpenBSD and OpenBSD-based distributions

$ sudo pkg_add vim-x11

FreeBSD and FreeBSD-based distributions

$ sudo pkg install editors/vim

Installation on Mac OS X

The strategy is similar to Mac OS X: we install the GUI version to get both the GUI and the TUI. In the end, we should be able to:

  • double-click the MacVim icon in the Finder,
  • click on the MacVim icon in the Dock,
  • issue $ mvim in the shell to open the MacVim GUI,
  • issue $ mvim -v in the shell to open the MacVim TUI.

Regular install

Download and install an official snapshot like you would with any other Mac OS X application.

Place the mvim script that comes bundled with MacVim somewhere in your $PATH.

Package manager

MacPorts:
$ sudo port selfupdate
$ sudo port install macvim
Homebrew:
$ brew install macvim

To make MacVim the default console Vim:

$ brew install macvim --with-override-system-vim

Installation on Windows

There is no Vim on Windows systems by default. You can download and install Vim from the Tuxproject site for more up-to-date and complete builds or you can download and install Vim from the official Vim site.

Chocolatey

> choco install vim

Building Vim from source

If the methods above don't suit your needs it is still possible to build Vim yourself, with only the options you need.

This topic will be discussed in its own section (currently in draft).