I often use ctrl+p and wonder why the subdirectory links appear before the links in the root project folder. The other way around seems a bit more logical to me.

Actually, in an ideal world the results of ctrl+p would promote the priority of items that are directory neighbours to the file you are currently editing, with the rest of the results being ordered in the usual, predictable, alphanumeric way. That's imho. There's a million ways you could order them and the current is, at least, very predictable

class PromptOpenFileInCurrentDirectoryTreeCommand(sublimeplugin.WindowCommand): """Open a file in the current directory tree using breadth first search"""

# code taken from http://code.activestate.com/recipes/511456/ def breadthFirstFileScan( self, root, max ) : cnt = 0 dirs = [root] # while we have dirs to scan while len(dirs) : nextDirs = [] for parent in dirs : # scan each dir for f in os.listdir( parent ) : # if there is a dir, then save for next ittr # if it is a file then yield it (we'll return later) ff = os.path.join( parent, f ) if os.path.isdir( ff ) : nextDirs.append( ff ) else : if wantFile(parent, f): yield ff cnt += 1 if cnt >= max: return # once we've done all the current dirs then # we set up the next itter as the child dirs # from the current itter. dirs = nextDirs