question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improvement: Auto-Complete switch statements containing enums

See original GitHub issue

Hi,

this is not an issue but an improvement suggestion. In Visual Studio, I always heavily relied on switch statement autocompletion with enums. As far as I understood, this cannot be done with snippets currently.

Example:

enum teams {
red,
blue
}

teams team;

//I type
switch (team) -> Press Tab

Shoudl autocomplete to


switch (team) {
     case teams.red:
        break;
     case team.blue:
        break;

Thank you very much!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:27
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
JoeRobichcommented, Jan 14, 2020

@yogster I have “OmniSharp: Enable Roslyn Analyzers” enabled but not sure if that is necessary.

4reactions
aldasscommented, Sep 27, 2017

agreed! I’m a longtime Visual Studio w/ReSharper user in the process of converting to VSCode and really, really, really miss this feature in VSCode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Switch enum auto-fill - Stack Overflow
I was typing a switch with an enum in VS 2013 and all case statements filled out automatically after I finished the switch....
Read more >
full auto completion of switch blocks for enums as in native VS ...
Hi when I create a switch block for an enum value the standard auto completion in Visual Studio 2017 creates the whole block...
Read more >
Autocomplete like enum. - Unity Forum
Hello everyone. How could I achieve to autocomplete in the editor to display a list of suggestions following a list or array of...
Read more >
autocomplete switch case statements - Visual Studio Feedback
This is especially useful for enum class (for which the only valid completion could be an enumeration from type foo) and often where...
Read more >
proper enum type and switch statement with pattern matching ...
I'd also like to see a switch/match statement for use with enums and more generally enumerable types like int, strings instead of long ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found