How to exclude css files from auto formatting in IntelliJ


Tags: css,intellij-idea,formatting,code-formatting

Problem :

We're using the auto formatting feature of IntelliJ to format our code whenever a commit to git is made.

The formatting works well for us except for our designer who's not happy with the way how IntelliJ formats his CSS files. Is there a way to deactivate auto formatting for certain file types?



Solution :

Since IDEA 13 it is possible to deactivate formatting with

/* @formatter:off */

and reactivate with

/* @formatter:on */

But you need to enable that first in Settings -> Code Style -> General -> Formatter Control


    CSS Howto..

    How to apply css to iframe content? [closed]

    How can I import a single string line of text to multiple HTML files?

    How to set link color inside GridView cell

    How do I get rid of an element's offset using CSS?

    How to match an index of a CSS class with JavaScript?

    How to make a HTML spinner with CSS

    how to move css element with scrolling left with Jquery?

    How can you separate the navigation bar list from the body list?

    How to add an additional css class from code behind using ASP.NET?

    How to connect CSS files to my JSP pages stored in Web-Content (Dynamic Web Project)

    How to detect when one or more JS/CSS library fail to load (e.g. CDN)?

    How can I apply css to elements created with append()

    How to modify your CSS working with Mobile Angular UI and Bootstrap

    how to make form input in middle

    How to fit CSS buttons into table cells?

    How to insert css code in php?

    In Wordpress how can I create a page which has 3 col-md-4 blocks in a container?

    How can I change input type of Yii CJuiAutoComplete?

    How to get CSS styling to shown on page? [closed]

    How to move links in the middle of the Web page using html/css?

    In what circumstances is flex-shrink applied to flex elements and how does it work?

    bar graph with CSS, how to get it filling in from bottom to top, not top to bottom?

    How to prevent css keyframe animation on page load?

    Can't figure out how to set color for specific div's in the loop

    jQuery: How to get DIV to slide-off the screen and another to slide in?

    How to make two separate, independent columns (using html and css)

    How to display two columns of blocks with CSS

    How to wrap a DIV around a DIV with CSS

    I can't make the a Background image display & and can't figure out how to fit text into the image

    How to make Angular Forms ngModel classes inherit from Bootstrap Forms classes