Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to format code in Visual Studio Team Services

Is there a means to format code snippets in any way, ideally a Markdown like syntax, in Visual Studio Team Services (formerly Visual Studio Online)?

Using italics just doesn't sit right with me.

Formatting code in Visual Studio Team Services

like image 324
Jay Wick Avatar asked Jun 14 '16 23:06

Jay Wick


People also ask

How can I format my code in Visual Studio?

The code formatting is available in Visual Studio Code (VSCode) through the following shortcuts or key combinations: On Windows Shift + Alt + F. On macOS Shift + Option + F. On Linux Ctrl + Shift + I.

How do I Auto Arrange codes in Visual Studio?

Auto formatting settings in Visual Studio Show activity on this post. Select the text you want to automatically indent. Click menu Edit → Advanced → *Format Selection, or press Ctrl + K , Ctrl + F . Format Selection applies the smart indenting rules for the language in which you are programming to the selected text.


3 Answers

You can copy/paste formatted code from a html view. For example Google docs with the "Code pretty" AddOn or an online tool like http://www.manoli.net/csharpformat/ This way you can also change font size, family and color if you need. It looks like enter image description here

like image 161
Frederic Avatar answered Oct 23 '22 08:10

Frederic


No, there is no way to achieve this feature. And there is already a feature request submitted for this on VSTS User Voice. You can vote it up here: Support markdown as an alternative to html for workitems.

like image 42
Eddie Chen - MSFT Avatar answered Oct 23 '22 09:10

Eddie Chen - MSFT


Just found this extension from the feature request @eddie linked.

Markdown

Markdown is a custom work item form control, that allows you to edit the rich text fields on your work items with a Markdown enabled editor.

like image 3
Jay Wick Avatar answered Oct 23 '22 10:10

Jay Wick