What’s new in Visual Studio productivity
We often hear feedback from users like you that request smaller quality-of-life improvements in Visual Studio. While we can’t address every piece of feedback right away, we appreciate the time you spend providing it and hope you continue to share your thoughts on how to make Visual Studio even better. In today’s blog post, we’d like to share a handful of these enhancements that can help you improve your personal productivity. You’ll now find:
- A timestamp feature added to the Output window to help you quickly identify where time is going during your build or other processes
- Selection matching quickly identifies other instances of a given selection
- The ability to scroll horizontally with the mouse wheel allowing you to parse through your code more quickly
- Audio cues to provide additional sensory feedback while navigating your code
- A highlight on the current line number to draw your attention more easily
You can start using all these features today in the latest release of Visual Studio:
Timestamps in the output window
When an operation takes more than a few milliseconds, it can be useful to know the specific times that individual steps take. The timestamp feature adds the time that each line is added to the Output window or any other log-type window.
To enable the Timestamps, invoke the Show Timestamp button (which looks like a clock) on the right side of the toolbar. You can also hit Alt-S while focus is in the Output window to move focus to the toolbar and repeatedly press Tab to get to the Show Timestamp button to toggle it on or off.
With timestamps enabled, the time will be prepended any time a line is added to the log. Enabling or disabling the timestamps won’t retroactively add or remove timestamps to lines in the log, it will only be applied to any lines as they are added to the log.
Quickly see matches with selection matches
This feature activates whenever a range of characters are selected in the editor that has 100 or less characters and is on a single line. When these conditions are met, Visual Studio finds and highlights any matching strings elsewhere in the editor. Additionally, any matches will be marked in the scrollbar if the “Map mode” scrollbar is enabled.
The highlight is a case-insensitive match and will match strings that differ by case. To enable or disable the feature, head to Tools\Options and look for the “Show selection matches” option on the Text Editor\General page.
Scroll horizontally with the mouse wheel
We’ve heard the feedback and we now have the ability in Visual Studio to use the mouse wheel to scroll the editor horizontally as well as vertically. Holding down the shift key while rolling the mouse wheel will cause the editor to scroll horizontally.
To modify the speed for horizontal mouse scrolling, head to Tools\Options and navigate to the Text Editor\Advanced page. Near the bottom of the list is an entry for Horizontal scrolling sensitivity. Increase the value in this box to cause the editor to scroll by more characters each time the mouse wheel is rolled.
Orient to your code with audio cues
Audio Cues are a feature that we realized was particularly valuable for our developers with visual disabilities. We’ve also been hearing from folks across our entire user base that they use them. These simple sounds can help users orient themselves quickly to what’s going on in their code.
To enable audio cues, head to Tools\Options and navigate to the Text Editor\General page. Near the top of the page is an option for “Enable audio cues”. If this box is checked when Visual Studio starts, Audio Cues will be enabled. Currently, Visual Studio has audio cues for the following events:
- When the caret arrives on a line that was added or removed when viewing a diff between two versions of a file
- When the caret arrives on a line with an error, breakpoint, or warning
While editing your code, if any of these events occur, Visual Studio will play the corresponding sound. If multiple events occur, only the highest priority sound will play.
To customize these sounds, go to the Settings in Windows and search for “Change System Sounds”. This will bring up the Sound panel and switch to the Sounds tab. Near the bottom of the Program Events list are the Microsoft Visual Studio events, which include these events and several other events that Visual Studio also recognizes. The other events can be configured, but these aren’t controlled by the “Enable audio cues” option on the Text Editor\General page from Visual Studio. You can use the Sound panel to disable any individual audio cue by setting its sound to (None).
Highlighting helps quickly identify the current line number
This feature makes it easier to identify the current line number at a glance by highlighting the current line number.
To customize how the current line number appears, head to Tools\Options and navigate to the Fonts and Colors page. The “Line Number (Current)” item controls the attributes for the current line number.
Your vote matters!
We hope these features help you become more productive using Visual Studio and would like to thank you once again for sharing your feedback. Head over to Developer Community to join in on the conversation with us by voting for suggestions that would make you more productive or provide new feedback to help us continue delivering new features that excite you. Thank you for being an important part of the Visual Studio family!