Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
494 views
in Technique[技术] by (71.8m points)

code-formatting - 如何在Visual Studio代码(VSCode)中格式化代码(How do you format code in Visual Studio Code (VSCode))

在Visual Studio中,Windows上的Ctrl + K + FCtrl + K + D等效于Visual Studio代码编辑器中的格式化或“美化”代码?

  ask by Brandon Clapp translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The code formatting is available in Visual Studio Code through the following shortcuts:

(Visual Studio Code中的代码格式通过以下快捷方式提供:)

  • On Windows Shift + Alt + F

    (在Windows Shift + Alt + F上)

  • On Mac Shift + Option + F

    (在Mac Shift + Option + F上)

  • On Ubuntu Ctrl + Shift + I

    (在Ubuntu上按Ctrl + Shift + I.)

Alternatively, you can find the shortcut, as well as other shortcuts, through the search functionality provided in the editor with Ctrl + Shift + P (or Command + Shift + P on Mac), and then searching for format document .

(或者,您可以通过编辑器中使用Ctrl + Shift + P (或Mac上的Command + Shift + P )提供的搜索功能找到快捷方式以及其他快捷方式,然后搜索格式文档 )


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...