Disable formatting in parts of source files with IntelliJ

Since I’m writing a lot of Spring code or using libraries like Rest Assured that allow to write somehow “human readable” code it’s nice to be able to turn off code formatting int IntelliJ so that the structure is not destroyed when the source file gets reformatted. given() .contentType("application/x-www-form-urlencoded; charset=utf-8") .when() .queryParam("foo", "bar") .get("http://localhost:8080/bar") .then() .statusCode(302) To prevent this from happening IntelliJ offers a function to turn off formatting by a marker comment.
Read more