Disable Formatter on parts of Code

Chester Wyke August 19, 2022 Updated: April 26, 2025 #PyCharm

Source: https://stackoverflow.com/questions/14020200/how-to-config-intellij-idea-not-format-some-part-of-the-code

How to use

# @formatter:off
...
# @formatter:on

Required Settings

Ensure it is enabled in settings

Search String: “formatter markers”

Editor -> Code Style: Formatter : Turn formatter on/off with markers in code comments

Screen Shot