especially when switching between programming languages
Very true, I switch all the time between Python and C at the moment and it is amazing how my indentation of C code, which does not matter, now looks like my indentation of Python where it is a vital part of the syntax.
As others have said you never remember it all, don’t even try. The more you do the more you will remember, but you will never remember all but a most trivial sub set of a language.