In order to sort across all include-groups, we first need to remove the empty lines between the groups (see also issue #15).
To re-group includes after sorting (by inserting new empty lines), I'd suggest adding an option to "Group Includes by Directory". ReSharper C++ has a similar feature, see the following pages:
Grouping by "full path depth" (deepest directory level) would be a good place to start:
#include "core/misc/log/log.h
#include "core/misc/log/log_utils.h
#include "core/misc/threads/threads.h
#include "core/render/dx/render_dx.h
#include "core/render/gl/render_gl.h
#include "products/product_1/main.h
#include "products/product_1/product.h
#include "products/product_2/main.h
#include "products/product_2/product.h
Ideally though, I'd like to specify at which "path depth" (1 or larger) we want the grouping to happen - so that, for example, for a depth of 2 we would get the following groupings:
#include "core/misc/log/log.h
#include "core/misc/log/log_utils.h
#include "core/misc/threads/threads.h
#include "core/render/dx/render_dx.h
#include "core/render/gl/render_gl.h
#include "products/product_1/main.h
#include "products/product_1/product.h
#include "products/product_2/main.h
#include "products/product_2/product.h
NOTE: Specifying a depth of 0 (zero) could then mean "no grouping"...