views:

44

answers:

2

I'm using the vim project plugin to manage a project, and whenever a new file goes in I need to use \R to refresh the project tree. This is fine, but I recently created a new directory in the tree, and \R doesn't update it and put it into the project.

What am I doing wrong?

A: 

My understanding is that \R updates folds of the project plugin recursively not directories in which the files are stored. To include a directory you have to set the filter accordingly, e.g.:

filter="newdirectory/*.c *.c *.h"
Habi
A: 

\R only updates the folds. The only satisfactory ways I've found to do add new directories is either to remove the entry and re-run \C to create the project again (I only tend to use this if there are a lot of new directories to include) or to add the directory manually like this:

Name=Path {
}

and then hit \r in that fold.

Although I've find this frustrating at times, I tend to consider it a feature now: I have a Documentation directory in my project, which contains all of the doxygen generated files and directories, of which there are masses. If I use \C after running doxygen, there are a ridiculous number of folds, so I then delete them from the list. \R then doesn't re-add them, which is a good thing.

It also means I can have (for example) a daft folder structure like this:

Project/
    Source/
        File1.c
        File2.c
    Headers/
        File1.h
        File2.h
    LibraryModules/
        FreeRTOS/
            Source/
                RTOSSource.c
                portable/
                    RVDS/
                        ARM_CM3/
                            port.c

and have it displayed as:

Project=/path/to/Project {
  Source=Source {
    File1.c
    File2.c
  }
  Headers=Headers {
    File1.h
    File2.h
  }
  LibraryModules=LibraryModules {
    FreeRTOSSource=FreeRTOS/Source {
      RTOSSource.c
    }
    FreeRTOSPort=FreeRTOS/Source/portable/RVDS/ARM_CM3 {
      port.c
    }
  }
}

which is at least a BIT more manageable.

Al
I was using \C originally, I didn't realize you could manually add a directory like that.
random