Visual Studio代码格式化程序 [英] Visual Studio code formatter

查看:235
本文介绍了Visual Studio代码格式化程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这是我的问题 - 我喜欢Eclipse,尤其是代码格式化(CTRL-移位-F)。
Visual Studio的Ctrl-k,Ctrl-d真的很吸引人,特别是对于javascript。

有没有办法让VS的行为像IDE我错过了?

解决方案

进入工具|选项|文本编辑器并编辑您喜欢的语言特定设置。 Ctrl-K,Ctrl-D尊重这些设置,所以你可以让代码格式化工具以你想要的方式工作。有很多选项可以改变(支架定位,间距,缩进等)。

I'm using Visual Studio 2008 for doing work in C# and JavaScript (AJAXy stuff).

Here's my issue -- I love Eclipse and especially the code formatted (Ctrl-Shift-F). Visual Studio's Ctrl-k, Ctrl-d, really sucks in comparison, especially for javascript.

Is there a way to get VS to behave like the IDE that I miss?

解决方案

Go into Tools | Options | Text Editor and edit the language specific settings to you're liking. Ctrl-K, Ctrl-D honors these settings, so you can make the code formatter working the way you want. There are a ton of options you can change (bracket positioning, spacing, indenting, etc.).

这篇关于Visual Studio代码格式化程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆