[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

How to configure editing of writing javascript in Visual Studio

Tony Johansson

1/10/2015 12:19:00 PM

When I write for example this code the brackets is often repositioned like
this in Visual Studio
function Rabbit(adjective) {
this.adjective = adjective;
}

but if I have written to have the brackets like this they should stay like
this until I change
function Rabbit(adjective)
{
this.adjective = adjective;
}

So can I change in Visual Studio so stay the way I want to have them

//Tony



2 Answers

John Harris

1/11/2015 11:30:00 AM

0

On Sat, 10 Jan 2015 13:18:31 +0100, "Tony Johansson"
<johansson.andersson@telia.com> wrote:

>When I write for example this code the brackets is often repositioned like
>this in Visual Studio
>function Rabbit(adjective) {
> this.adjective = adjective;
> }
>
>but if I have written to have the brackets like this they should stay like
>this until I change
>function Rabbit(adjective)
>{
> this.adjective = adjective;
> }
>
>So can I change in Visual Studio so stay the way I want to have them

Go through all the editor's options looking for one that chooses the
curly bracket style. I don't know if VS has this option, but certainly
several other editors do so it's worth a look.

John

Michael Haufe (\"TNO\")

1/12/2015 2:19:00 PM

0

On Saturday, January 10, 2015 at 9:32:27 PM UTC-6, Tony Johansson wrote:
> When I write for example this code the brackets is often repositioned like
> this in Visual Studio
> function Rabbit(adjective) {
> this.adjective = adjective;
> }
>
> but if I have written to have the brackets like this they should stay like
> this until I change
> function Rabbit(adjective)
> {
> this.adjective = adjective;
> }
>
> So can I change in Visual Studio so stay the way I want to have them

Check your config. it is somewhere in this area (depending on IDE version):

Tools Menu -> Options -> Show all Parameters (checkbox at the bottom left)
-> Text Editor -> JavaScript -> Formatting