Is there a way to have vim (or a plugin) read a json file and use that to define a browsing structure?
In my case, the json file defines a novel, which is a collection of chapters. A chapter is a set of scene files.
The reason to do this is to allow many different organizations of the same set of files. A disk-based directory/file structure isn't flexible enough for multiple hierarchies.
I'd like to see something like this in the file browser window, with the structure defined in a json file (see example below):
MyNovel/
Beginning/
001
002
003
Middle/
004
100
101
End/
203
202
201
{
"version" : "2.0",
"manuscript" : {
"title" : "MyNovel",
"chapters" : [
{
"title" : "Beginning",
"scenes" : ["001", "002", "003"]
},
{
"title" : "Middle",
"scenes" : ["004", "100", "101"]
},
{
"title" : "End",
"scenes" : ["203", "202", "201"]
}
]
}
}
In this case, MyNovel
, Beginning
, Middle
, and End
are virtual groupings of the scene files, and do not exist on disk.
I'm happy to hack my own solution. I've looked at most common vim plugins, and don't see an example to use as a starting point, but it seems like something like this has got to be out there somewhere ...
Thanks!