Basics
Installation
Download project.tar.gz from here. The current version is 1.4.1. Extract its contents into a folder currently in your Vim runtimepath.If you do not know where to extract the contents of project.tar.gz, the “preferred” directory depends on your operating system.
Linux, Unix, and Mac OS X users should use:
~/.vim/Windows users should use:
HOME\vimfiles
where HOME is the user folder.For example, if you are running Windows 7 (or Windows Vista) and your user name is “Principal Buttsavage”, and your user folder is on the C drive:
C:\Users\Principal Buttsavage\vimfiles\Tar.gz support is not built into Windows, so those users need an application to open .tar.gz files. I suggest using 7-Zip or 7-Zip Portable, but there are many other programs out there.
Accessing Project.tar.gz documentation from vim help
Run vim and type the following while in normal mode::helptags directory/docwhere directory is your vimfiles directory. It’s that simple!
Basic Usage
Unlike similar solutions, project.vim requires users to setup a text file that contains information on one or more projects. Project.vim has a default text file that it uses:$HOME/.vimprojectsTo use this file as the project file, type the following while in vim’s normal mode:
:ProjectWhat I prefer to do is use a separate file named ‘p’ in the main directory of a project. When I delete the project files, I do not have to remove the project in .vimprojects. To use a different file for the project viewer, type the following while in vim’s normal mode:
:Project filenameWhere filename is the name of the file to use.
For details on how to define a project, be sure to to read project.txt (the help file in project.tar.gz).
After making (and loading) a project file, navigate it like you would any other file/directory in Vim. Put your cursor over a project and hit Enter to expand it. Put your cursor over a filename and hit Enter to open it. Press \r to automatically fill a project (see example below).
Sample Project File – p from CalculatorD
Code
Calculator_Project=~/CalculatorD CD=. { makefile
Java_Files=src/CalculatorD filter="*.java" { } }
Resulting Project Display in Vim
(using the fantastic MountainDew color scheme)
I pressed '\r' while my cursor was on Java_Files to automatically fill-in the source files. This must be done any time you add files to a project.
1 comment:
Thanks for this article! I couldn't figure out how to use this plugin and the help files were somewhat difficult to understand. Now I have a better grasp of how to use it my productivity should increase quite a bit. Thanks again!
Post a Comment