How to config intellij-idea not format some part of the code?

后端 未结 4 1281
借酒劲吻你
借酒劲吻你 2021-02-05 00:54

In a html file, there is some code used custom template-language:



        
4条回答
  •  孤独总比滥情好
    2021-02-05 01:42

    Since EAP 13 you can trigger the formatter with the following comments:

    // @formatter:off
    ...
    // @formatter:on 
    

    To enable it in "surround with", you can define a Live Template in the section "surround" with:

    // @formatter:off
    $SELECTION$
    // @formatter:off
    

    You can find these settings in Settings -> Code Style -> General and set your own trigger words.

提交回复
热议问题