开发者

Visual Studio 2010 insists on inserting spaces in JavaScript

开发者 https://www.devze.com 2022-12-28 10:21 出处:网络
Visual Studio 2010 inserts a开发者_运维技巧 space between the keyword \"function\" and the following parenthesis.Is it possible to turn this off? i.e.

Visual Studio 2010 inserts a开发者_运维技巧 space between the keyword "function" and the following parenthesis. Is it possible to turn this off? i.e.

Visual Studio formats my code like:

var vsfn = function () { };

I would like this formatting:

var myfn = function() {};


VS2010 sp1 introduced a new option: Insert space after function keyword for anonymous functions in Tools > Options > Text Editor > JScript > Formatting > Spacing . You can turn it off to get the desired behavior.


You should find these settings here:

Tools > Options > Text Editor > JScript > Formatting > Spacing

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号