Currently, Visual Studio for Mac only supports the following technologies With Visual Studio for Mac you can write in C#, F#, Razor, HTML5, CSS, Javascript, Typescript, XAML.
- Visual Studio Code For Mac
- Visual Studio Code Mac Install
- Visual Studio Auto Format
- Format Xml Visual Studio Code
- Microsoft Visual Studio Mac
For information about keyboard accessibility, see How to: Use Keyboard Navigation.
- Visual Studio Code on macOS Installation. Download Visual Studio Code for macOS. Open the browser's download list and locate the downloaded archive. Select the 'magnifying glass' icon to open the archive in Finder. Drag Visual Studio Code.app to the Applications folder, making it available in the macOS Launchpad.
- One of the best features of the Visual F# tooling in Visual Studio for Mac is the F# Interactive Window. It allows you to send code over to a process where you can call that code and see the result interactively. To begin using it, highlight the square function defined.
- The Apache 2.0 Consistently Formatting Code license is a challenge, but modern developer tools make it possible to automatically maintain consistency within your team's code base. In this article, you will configure More Beautiful to automatically format the code in Visual Studio Code, also known as Vs Code.
- VS Code plugin for LuaFormatter. Reformats your Lua source code. Extension Settings. Vscode-lua-format.configPath: Specifies the style config file.Style Options; vscode-lua-format.binaryPath: Specifies alternative lua-format binary path.
You can access a variety of commands in Visual Studio for Mac by using the appropriate keyboard shortcut. This document lists the default shortcuts for the Visual Studio for Mac key binding scheme. For more information about how to change the key binding scheme, see Customizing the IDE. You can also customize shortcuts for a command using the Visual Studio for Mac > Preferences menu item and choosing Environment > Key Bindings in the Preferences window.
Tip
The keyboard shortcuts displayed in this document, and the key binding preferences in Visual Studio for Mac, are presented using the symbols commonly used in macOS. If you are unsure of a symbol, review the macOS key symbols loopkup table.
Downloadable quick ref pdfs
We have compiled the most used, and most useful, keyboard shortcuts into a downloadable pdf file. We have two versions,one that shows shortcuts for Visual Studio for Mac, and a version that shows Visual Studio shorts side-by-side for usersthat have prior experience with Visual Studio when using Windows.
Code Navigation
Commands | Keyboard shortcuts |
---|---|
Find References | ⇧⌘R, F12 |
Go to Declaration | ⌘D, F12 |
Next Error | ⌥⇧⇟, ⇧⌘F12 |
Next Issue in File | ⌥⇟ |
Previous Error | ⌥⇧⇞ |
Previous Issue in File | ⌥⇞ |
Debug
Commands | Keyboard shortcuts |
---|---|
Enable or Disable Breakpoint | ⌥⌘/, ⌘F9 |
Pause | ⌥⌘P, ⌥⌘L5 |
Remove All Breakpoints | ⇧⌘F9 |
Run To Cursor | ⌘F10 |
Set Next Statement | ⇧⌘F10 |
Show Next Statement | ⌥* |
Step Into | ⇧⌘I, ⌘F11 |
Step Out | ⇧⌘U, ⇧⌘F11 |
Step Over | ⇧⌘O, F10 |
Toggle Breakpoint | ⌘, F9 |
View Breakpoints | ⌥⌘B |
Designer
Commands | Keyboard shortcuts |
---|---|
Switch between related files | ⌃⌘↑ |
Edit
Commands | Keyboard shortcuts |
---|---|
Constraint Editing Mode | ⌘E |
Copy | ⌘C |
Cut | ⌘X |
Delete | ⌘⌫ |
Format Document | ⌃I |
Indent Selection | ⌘] |
Paste | ⌘V |
Preferences | ⌘, |
Redo | ⇧⌘Z |
Rename | ⌘R, F2 |
Select All | ⌘A |
Show Code Generation | ⌘I |
Toggle All Folds | ⌥⇧⌘↑ |
Toggle Definitions | ⌥⇧⌘↓ |
Toggle Fold | ⌥⇧⌘← |
Toggle Line Comment(s) | ⌘/ |
Undo | ⌘Z |
Unindent Selection | ⌘[ |
Update Frame from Constraints | ⇧⌘R |
F# Integration
Commands | Keyboard shortcuts |
---|---|
Clear F# Interactive | ⌃⌥C |
F# Interactive | ⌃⌥F |
Restart F# Interactive | ⌃⌥R |
Send line to F# Interactive | ⌃⌥L |
Send references to F# Interactive | ⌃⌥P |
Send selection to F# Interactive | ⌃⏎ |
File
Commands | Keyboard shortcuts |
---|---|
Close All | ⇧⌘W |
Close File | ⌘W |
Close Workspace | ⌥⌘W |
New File | ⌘N |
New Solution | ⇧⌘N |
Open | ⌘O |
⌘P | |
Quit | ⌘Q |
Revert | ⌘U |
Save | ⌘S |
Save All | ⇧⌘S |
Help
Commands | Keyboard shortcuts |
---|---|
API Documentation | ⌥⌘? |
Unity API Reference | ⌘' |
Other
Commands | Keyboard shortcuts |
---|---|
Implement Unity Messages | ⇧⌘M |
Inspect | ⌥⌘I |
Project
Commands | Keyboard shortcuts |
---|---|
Add Files | ⌥⌘A |
Build | ⌘K, ⇧F6 |
Build All | ⌘B, F6 |
Clean | ⇧⌘K |
Rebuild | ⌃⌘K |
Rebuild All | ⌃⌘B |
Start Debugging | ⌘⏎, F5 |
Start Without Debugging | ⌥⌘⏎, ⌃F5 |
Stop | ⇧⌘⏎, ⇧F5 |
Refactoring
Commands | Keyboard shortcuts |
---|---|
Import Symbol | ⌃⌥␣ |
Quick Fix | ⌥⏎ |
Search
Commands | Keyboard shortcuts |
---|---|
Command | ⇧⌘P |
Find in Files | ⇧⌘F |
Find Next | ⌘G, F3 |
Find Next Like Selection | ⌘E, ⌘F3 |
Find Previous | ⇧⌘G, ⇧F3 |
Find Previous Like Selection | ⇧⌘F3 |
Find | ⌘F |
Go to File | ⇧⌘D |
Go to Line | ⌘L |
Go to Type | ⇧⌘T |
Navigate To | ⌘. |
Replace in Files | ⌥⇧⌘F |
Replace | ⌥⌘F |
Text Editor
Commands | Keyboard shortcuts |
---|---|
Complete Word | ⌃␣ |
Delete left character | ⌃H |
Delete next subword | ⌃⌦ |
Delete next word | ⌥⌦ |
Delete previous subword | ⌃⌫ |
Delete previous word | ⌥⌫ |
Delete right character | ⌃D |
Delete to end of line | ⌃K |
Dynamic abbrev | ⌃/ |
Expand selection | ⌥⇧↓ |
Expand selection | ⌥⇧↑ |
Expand selection to document end | ⇧⌘↓, ⇧⌘↘ |
Expand selection to document start | ⇧⌘↑, ⇧⌘↖ |
Expand selection to line end | ⇧↘, ⇧⌘→ |
Expand selection to line start | ⇧↖, ⇧⌘← |
Expand selection to next line | ⇧↓ |
Expand selection to next word | ⌥⇧→ |
Expand selection to page down | ⇧⇟ |
Expand selection to page up | ⇧⇞ |
Expand selection to previous line | ⇧↑ |
Expand selection to previous word | ⌥⇧← |
Expand selection to the left | ⇧← |
Expand selection to the right | ⇧→ |
Find caret | ⌘| |
Go left one character | ⌃B |
Go right one character | ⌃F |
Go to beginning of document | ⌘↑ |
Go to beginning of line | ⌘←, ⌃A |
Go to end of document | ⌘↓ |
Go to end of line | ⌘→, ⌃E |
Go to Matching Brace | ⇧⌘ |
Go to next line | ⌃N |
Go to next word | ⌥→ |
Go to previous line | ⌃P |
Go to previous word | ⌥← |
Insert line break after the caret | ⌃O |
Move caret to EOL and insert new line | ⇧⏎ |
Move the line or highlighted selection down | ⌥↓ |
Move the line or highlighted selection up | ⌥↑ |
Move to next usage | ⌃⌥⌘↓ |
Move to prev usage | ⌃⌥⌘↑ |
Show Parameter List | ⌃⇧␣ |
Show quick info | ⌘F1 |
Show Scopes | ⌥⇧⌘P |
Transpose characters | ⌃T |
Wrap with <div> | ⌥⇧W |
View
Visual Studio Code For Mac
Commands | Keyboard shortcuts |
---|---|
Center and Focus Document | ⌃L |
Focus Document | F7 |
Full Screen | ⌃⌘F |
Move to Next Notebook | ⌥⌘→ |
Move to Previous Notebook | ⌥⌘← |
Navigate Back | ⌃⌘← |
Navigate Forward | ⌃⌘→ |
Normal Size | ⌘0 |
One Editor Column | ⌥⌘1 |
Show Next | ⌥⌘↓, F8 |
Show Previous | ⌥⌘↑, ⇧F8 |
Two Editor Columns | ⌥⌘2 |
Zoom In | ⌘+, ⌘= |
Zoom Out | ⌘-, ⌘_ |
Window
Commands | Keyboard shortcuts |
---|---|
Activate 1 | ⌘1 |
Activate 2 | ⌘2 |
Activate 3 | ⌘3 |
Activate 4 | ⌘4 |
Activate 5 | ⌘5 |
Activate 6 | ⌘6 |
Activate 7 | ⌘7 |
Activate 8 | ⌘8 |
Activate 9 | ⌘9 |
Hide Others | ⌥⌘H |
Hide Visual Studio | ⌘H |
Minimize | ⌘M |
Next Document | ⌘}, ⌘F6 |
Previous Document | ⌘{, ⇧⌘F6 |
Switch to next document | ⌃⇥ |
Switch to next tool window | ⌃⌥⇥ |
Switch to previous document | ⌃⇧⇥ |
Switch to previous tool window | ⌃⌥⇧⇥ |
macOS key symbols lookup
Symbol | Key |
---|---|
⌘ | Command (cmd) |
⌥ | Option (alt) |
⇧ | Shift |
⌃ | Control (ctrl) |
⇞ | Page Up (Pg Up) |
⇟ | Page Down (Pg Dn) |
⌫ | Delete (Backspace) |
⌦ | Forward Delete |
⏎ | Return |
←→↑↓ | Arrow Keys |
↖ | Home |
↘ | End |
␣ | Space Bar |
⇥ | Tab |
See also
Format the class file and arrange fields, properties and methods as per StyleCop rules.
Features
- Format the class file (.cs) to arrange members of class in the proper order.
- Using statements are brought inside namespace block.
- Unwanted namespaces are removed.
- Unwanted space are removed.
- Proper space introduced where ever required.
- Adds header comments on members of the class.
- Modifies the comment on the members if signature of the member is changed
- Can group members by regions
Feature Format class
Members of the class are arranged in following order
- Constants
- Fields
- Constructors
- Properties
- Methods
Furthermore the members are also sorted by access modifiers as follows
- public
- internal
- protected
- private
How to use
After installation can execute format code command from two different place.
Option 1
- Go to any .cs file and open in code editor.
- Right click on the code file and you will get option to 'Format Code' as shown below.
- You can also invoke this command using Keyboard shortcut 'Ctrl+D, Ctrl+F'
Option 2
- Go to solution explorer
- Select the .cs file which needs to be formatted
- Right click on the file and you will get 'Format Code' option on the menu as shown below.
Option 3
- Go to solution explorer
- Select the any project which needs to be formatted
- Right click on that project and you will get 'Code Formatter > Format Code' option on the menu as shown below.
Option 4
- Go to solution explorer
- Select the solution node
- Right click on that solution node and you will get 'Code Formatter > Format Code' option on the menu as shown below.
In Option 3 and 4, all the .cs file present within the Project or solution respectively will get formatted automatically.
Settings
Settings for tool can be accessed from Visual Studio options screen as shown below.
General Settings
Type Layout
You can customize the layout of the class or interface by setting required layout under Type layout setting
Note: That the first time when this extension is installed, type layout will be blank. Hence first time user will have to configure the type layout, and you can also set type layout with the help of the default templates.
File Header
You can also choose to include class header by updating setting under File Header.
You can customize the file header format and you can use the available replacement to format the header.
You can also have the different file header template based on the solution or project also.
To have customized file header for a perticular solution, go to Solution and right click and go to 'Code Formatter >> Add Header Setting File'. And you can set perticular format in that setting file.
Same is applicable of project level file header as well.
Visual Studio Code Mac Install
Note: File template selection will first check for project header setting file, if not found then it will look for solution header setting file and if the file is not present then global header will be applied.
Download this extension from the VS Gallery
Visual Studio Auto Format
Installation Guide:
1. If you are installing it manually using VSIX file then make sure you uninstall the previous version anf then install the new version. Because if at the same time multiple version are installed of the same extension then extension will be disabled by Visual Studio.
Format Xml Visual Studio Code
2. It is advisable to install the extension from Tools > Extensions and Update option.
Microsoft Visual Studio Mac
License