Your comments

I made a small plugin that implements this feature. Hope it helps.

I implemented this myself as a plugin. The source code can be found at:

It is my first program written in Python, so it might contain some beginner mistakes, but so far it seems to work correct.