Friday, September 21, 2012

Setting Up Pathogen Plugin for Windows 7 GVim

I spent some time a while ago getting the pathogen plugin for vim to work on my Windows 7 64-bit machine.  I looked everywhere for a solution but found only bits and pieces.  So here's what I did:

For starters I installed vim in my Home directory (ie C:\Users\Todd\).  I also created a _vimrc file (with no file extension) there as well with the following contents:


set nocp
call pathogen#infect()
syntax on
filetype plugin indent on


Next I created a folder under Vim called vimfiles with two subfolders beneath that, autoload and bundle.  I downloaded pathogen.vim file and moved it into the autoload folder.  In order to test pathogen, I cloned the snipmate plugin and moved the folder snipmate.vim into the bundle folder.

To generate the help documentation for snipmate, type :Helptags and then hit Enter.

To view snipmate's help documentation, type :help snipmate

To see snipmate in action, open up a Java file and type "for" followed by a tab.  You'll see that snipmate will add a for loop snippet there.

No comments:

Post a Comment