views:

58

answers:

1

I'm using project.vim to manage a project, and I'm having trouble adding a file to the project. I read the documentation and it said to 'insert the filename into the project entry, then hit return on it'.

From what I understand, a project entry is one of the sections in the project window that looks like...

 Header Files="Header Files" { 
 // header files listed here 
 } 

so if I go into that list, and insert say, Foo.h, Foo.h should show up in that directory on my system. However, it doesn't. I'm sure I'm doing something wrong, any help is appreciated, thanks.

A: 

I don't think project.vim has any support for directly creating files. If you have created a project entry for an existing directory, something like this:

Project Name=/path/to/my/project filter="*.c *.h" {
  Header Files=Headers {
  }
  Source Files=Source {
  }
}

You should be able to put the cursor on the "Header Files" line and press \r to add all the files that are in the directory. Pressing ENTER on any of the files will open it.

There's no 'direct' way to create new files, but you can go into the Headers section and enter "Foo.h". This won't create a file, but if you press ENTER on your new entry, vim will open the non-existent file and you can use :w to create it.

Hope that helps.

Al