Your settings and edition of Visual Studio might change the names and locations of menu commands and the options that appear in dialog boxes. For a complete list of all default shortcuts, see Global shortcuts. If you use such a shortcut when you're in the specific context, the shortcut invokes the command for the specific context, not the Global context. But a shortcut can be assigned to one command in the Global context and a different command in a specific context. If a shortcut is assigned to a command in the Global context and no other contexts, that shortcut will always invoke that command. For a complete list of all the shortcuts and their commands, see Keyboard shortcuts in Visual Studio. You can also look up the default keyboard shortcuts for several dozen commands in Popular keyboard shortcuts. Regardless of settings, customization, and context, you can always find and change a keyboard shortcut in the Options dialog box. For example, the F2 shortcut invokes the Edit.EditCell command if you're using the Settings Designer, and it invokes the File.Rename command if you're using Solution Explorer. Which context you're in when you choose the shortcut. Whether you've customized the shortcut's behavior. (For more information about changing or resetting your settings, see Environment settings.) Which default environment settings you choose the first time that you open Visual Studio-for example, General development or Visual C#. Many shortcuts always invoke the same commands, but the behavior of a shortcut might vary based on the following conditions: You can identify keyboard shortcuts for Visual Studio commands, customize those shortcuts, and export them for others to use. If Sticky Scroll is not working, try enabling the following options in Tools > Options > Text Editor > C# > Advanced.Applies to: Visual Studio Visual Studio for Mac Visual Studio Code Sticky Scroll requires Block Structure Guides to be enabled for some languages (e.g., C#). Let us know what you think of Sticky Scroll in Visual Studio on this feedback ticket and report any issues you face so we can improve the experience. Try Sticky Scroll in Visual Studio 2022 17.6Įnable it in Tools > Options > Text Editor > General > Sticky Scroll by toggling the checkbox for “Group the current scopes within a scrollable region of the editor window.” But if you need to quickly turn it off, you can right-click on the Sticky Scroll area and click “Sticky Scroll”. “Prefer inner scopes” shows lower-level scopes: “Prefer outer scopes” shows top-level scopes: The new option “Prefer inner scopes” shows lower-level scopes by pushing out higher-level scopes as you scroll through deeply nested code. “Prefer outer scopes” is set by default, which shows the higher-level scopes that come from the top of the file. In Options, you can configure whether outer or inner scopes are prioritized with “When number of scopes exceeds the maximum”. Instead, it’d be more useful if lines that are likely to be different are shown instead. It can feel wasteful to give up two lines of vertical space for info that is often obvious. Oftentimes, the namespace and class name match the file name. We’ve heard feedback about how sticking outer scopes isn’t helpful. New: Choose between outer or inner scopes Let us know what you think of Sticky Scroll in Visual Studio on this feedback ticket.
0 Comments
Leave a Reply. |