Install a Vim Package on Vim 8 Running on Windows 7

vim_logo_1

This post gives step-by-step instructions for installing a Vim package on Vim 8 (specifically 8.1.606) running on Windows 7 (SP1).

Info

This post uses the vim-airline plugin available at [link] to demonstrate how to install a plugin. It uses vim-airline because its very obvious if it works and its a useful plugin.

Steps

Step 1: Open gVim 8.1 by double clicking the gVim 8.1 icon:

open_gvim_2

You should see:

gvim_3

Note: your specific version may be different. It should at least be version 8 something for these steps to work.

Step 2:

A) Run :set packpath

You should see:

packpath=~/vimfiles,C:\Program Files\Vim/vimfiles,C:\Program Files\Vim\vim81,C:\Program Files\Vim/vimfiles/after,~/vimfiles/after

B) Make sure the you see ~/vimfiles

Note: to “copy” this, i.e. copy the ex command output in Vim parlance, so that you can paste it into another document (like a Word document) [-romainl-] from Reddit (thanks -romainl-) shared at [link] that you can type :let @*=&packpath and then Paste into an external document. This may be better than another method you can use **:enew pu=execute(‘set packpath’)** which sends the output to a buffer, then you can copy from the buffer. Type :q! to close the buffer that pops up. The second method may be useful if you don’t want all the output.

Step 3: Find ~/vimfiles which should be C:\Users\username\vimfiles and open an Explorer window

Step 4: Create a directory named pack

create_pack_directory_4

Step 5: Enter the pack directory and create a directory named anyname (you can name this something else)

create_anyname_5

Step 6: Click inside anyname and create a directory called start

create_start_6

Step 6: Download a Zip file from https://github.com/vim-airline/vim-airline to

C:\Users\username\vimfiles\pack\anyname\start\

A) On https://github.com/vim-airline/vim-airline click Clone of download

B) Click Download ZIP

download_zip_file_7

C) Click Save

save_zip_file_8

Step 7: A) Right-click on vim-airline-master.zip and B) click Extract All…

extract_zip_file_9

You’ll see:

select_extract_10

C) Remove vim-airline-master and D) click Extract

confirm_extract_11

E) Click on vim-airline-master and you should see:

click_vim_airline_master_12

Step 8: Restart gVim 8.1. You should see a new bar:

new_vim_bar_13

References

  • Copy ex command output [link]

  • The Vim logo is from [link]