Reputation: 3252
I would like to know what the keyboard shortcut is in Visual Studio 2015 which allows me to advance to the next Quick Action in the file I am viewing.
The behavior I am looking for would be similar to ReSharper's "next code issue" (F12) shortcut.
Upvotes: 20
Views: 2096
Reputation: 173
was searching for the same and with help of this post I was able to found the following, which suits my needs more:
for me in VS2017, the right combination was "Edit.GoToNextIssueinFile" (Alt+PgDn) and vice versa.
Upvotes: 7
Reputation: 3467
F8 (and Shift+F8 to go backwards).
Or at least that's what it is in my keyboard profile – you can go to Tools → Options → Environment → Keyboard
and check out Edit.GoToNextLocation
.
Note: If you configured Visual Studio using VB keyboard settings, no key has been assigned to this function. You need to pick your own and assign them.
You use CTRL+Shift+F12 which is View.NextError
.There is a difference between View.NextError
and Edit.GoToNextLocation
.
Upvotes: 0
Reputation: 18980
The closest solution might be indeed to move to the next/previous error with the built-in hotkeys (F8/Shift+F8 or Ctrl+Shift+F12) and then invoke the light bulb action.
The only way I see to get what you want might be a custom Visual studio extension. However, I am not sure if it is feasible. One could try to query all global suggested actions and/or move the caret over the code and query HasSuggestedActionsAsync - since SuggestedActionSet represents a list of suggested actions that are all applicable to a span of text in an ITextBuffer. This would be definitively slow. I guess ReSharper stores the suggestions while parsing the code in an array to make this feature available.
Here is a VSSDK extensibility sample, that provides somewhat of a starting point. See also: Walkthrough: Displaying Light Bulb Suggestions.
Upvotes: 5
Reputation: 49649
The best solution I have found so far is this:
Apart from this beeing quite cumbersome, the downside here is also that once you reached the end (or start) of the file it will continue with the next (or previous) file in the "Error List".
Upvotes: 5