Code styling without modifying the binaries

73 views Asked by At

On the WebStorm for example and I believe in any Intellij product. You can easily refeactor the code and style it as you like from the setting 'Code Style'. But, the styling and refactoring actually change the binaries of the file. for example if you decide you want new line after { it will add \n in each place.

I want to know if it possible to only visually display those different to the coder. If I'm coding like this:

var func = function()
{
    // Blah
}

And another programmer on the team code like this:

var func = function() {
    // Blah
}

and also if I code like this:

var text = "";

and the other like this:

var text = '';

The thing is that I don't really care how it would actually be like in the saved file. I only care how it would be displayed to the programmer. It is possible to achieve this ?

1

There are 1 answers

2
Thorsten Schöning On BEST ANSWER

Simple answer: No. That's because coding rules exist and besides things like changed binaries you have the problem of version control as well. which style of your code should be versioned? While VCS' are able to deal with different line endings, what you ask for isn't supported anywhere.