Update formats for which trailing whitespace is removed on buf write.
Also changed global indentation to 2 spaces and made python the
exception.