Use command+shift+m as keybinding for "forMat code"

This still saves the current cursor position.