A simpler version of #36 is when the modelines are identical, subsequent ones can be removed.
This will also help with the gitignore includes, as sometimes the same rule appears in multiple included files.
This might be best done as a Jinja extension.