-1

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 ?

Ido
  • 2,034
  • 1
  • 17
  • 16
  • 1
    I don't think anything like this is possible without solving some medium hard problems. How to handle edits, for example? The app would have to know to translate between your preferred representation and some other one that is meant to be canonical. – Robert Moskal Jun 20 '15 at 14:23

1 Answers1

2

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.

Thorsten Schöning
  • 3,501
  • 2
  • 25
  • 46
  • The logic I think of is to let WebStorm decide how to display stuff. same way he decide to give a color to function a different one to the string. it doesn't really inside the file. just inside the IDE and how he display things depends on your settings. so there is no way to 'add' to the bridge where WebStorm decide how things should look like and change it there ? by the plugin or something ;D – Ido Jun 20 '15 at 14:32
  • 2
    @Ido You can surely write something like you want on your own and deal with all the problems occuring... But it would be a waste of time and I even doubt that you are able to solve all the problems on your own. – Thorsten Schöning Jun 20 '15 at 14:41