In Matlab, you can choose to format the whole file, or only part of it by selecting (highlighting) the text. I work in a codebase ...