How do I use the Project plugin?

59 views
Skip to first unread message

703designs

unread,
Jun 9, 2008, 9:50:19 AM6/9/08
to vim_use
I find that the Project plugin's documentation is difficult to
understand, and I can't figure out how to use this plugin. I've
Googled for the past week and haven't come up with anything except for
the plugin's official docs. Can anyone who uses this plugin explain
its usage in human terms? Basic or advanced, I'm just interested in
taking advantage of this well-reviewed plugin.

david wright

unread,
Jun 9, 2008, 4:17:05 PM6/9/08
to vim...@googlegroups.com
--- On Mon, 6/9/08, 703designs <thomas...@gmail.com> wrote:

nutshell version:

I'll assume you are using vim >= 7.0 (and linux).

cd ~/.vim/ && wget http://www.vim.org/scripts/download_script.php?src_id=6273
tar zxvf project-1.4.1.tar.gz

the above action will download the project plugin and create two directories
~/.vim/doc and ~/.vim/plugin and populate each with one file.
~/.vim/plugin/project.vim
and
~/.vim/doc/project.txt

create a file called ~/.vimprojects (this is the default project file)

# add this very basic entry:

php_webev=/home/david/projects/webdev_php/unit_tests CD=. filter="*.php"{}

this would open every file the ends with ".php" in the /home/david/projects/webdev_php/unit_tests
directory (so adjust your filter accordingly)


# to test the above:

$ vim
once you have vim open, in command mode type :Project
there should now be 2 panels open in vim, the narrow one on the left, the 'navigation' window
is the Project window

in the navigation window you should have an entry such as:
php_webev-----------
(to get to the navigation window you will have to (Ctrl w h) [to get to the editor window (Ctrl w l)]

once in the navigation window, hit Enter to expand the ----- to a list of files
if there are no files, hit \R to reload/expand the directory entries

once there are file entries in the navigation panel place you cursor over one and press Enter,
the file should now be loaded in the editor window panel


Note: you will also have to add this entry to your ~/.vimrc
" use with Project
set nocompatible


hopefully this will at least get you started.


+David

703designs

unread,
Jun 10, 2008, 10:12:44 AM6/10/08
to vim_use
I understand everything but the .vimprojects line: php_webev=/home/
david/projects/webdev_php/unit_tests CD=. filter="*.php"{}

How would I write that to grab every file in a directory, regardless
of extension? Better yet, could a project definition grab all files in
a directory except .png, .jpg, .gif, .ico, and a few others? And
further, could I define a string or array of excluded extensions and
use it with every project?

On Jun 9, 4:17 pm, david wright <david_v_wri...@yahoo.com> wrote:
> --- On Mon, 6/9/08, 703designs <thomasmal...@gmail.com> wrote:
>
> > From: 703designs <thomasmal...@gmail.com>
> > Subject: How do I use the Project plugin?
> > To: "vim_use" <vim...@googlegroups.com>
> > Date: Monday, June 9, 2008, 9:50 AM
> > I find that the Project plugin's documentation is
> > difficult to
> > understand, and I can't figure out how to use this
> > plugin. I've
> > Googled for the past week and haven't come up with
> > anything except for
> > the plugin's official docs. Can anyone who uses this
> > plugin explain
> > its usage in human terms? Basic or advanced, I'm just
> > interested in
> > taking advantage of this well-reviewed plugin.
>
> nutshell version:
>
> I'll assume you are using vim >= 7.0 (and linux).
>
> cd ~/.vim/ && wgethttp://www.vim.org/scripts/download_script.php?src_id=6273
Reply all
Reply to author
Forward
0 new messages