C
C#12mo ago
Kru

Block of code

How do people create block of code real fast in format using {}. I see them type {} and next thing it shows up as follows. static void something() { }
20 Replies
Pobiega
Pobiega12mo ago
Most code editors have support for that built in Rider and VS and VS Code all do, thats for sure.
Kru
KruOP12mo ago
is that specific shortcut?
Pobiega
Pobiega12mo ago
nah, you just type the opening brace and the editor automatically does the rest there are also snippets for creating classes, properties, etc prop<tab><tab> is a classic
Kru
KruOP12mo ago
Understood,
Mayor McCheese
Mayor McCheese12mo ago
Ctor
Pobiega
Pobiega12mo ago
ah yep, good shout thats a crucial one
mtreit
mtreit12mo ago
I don't know any of those shortcuts 😦
Mayor McCheese
Mayor McCheese12mo ago
I think you're trolling me
mtreit
mtreit12mo ago
I'm not.
grape
grape12mo ago
never used snippets personally just completion suggestions with tab + fast typing is good nuff
alex
alex12mo ago
press ctrl + space and scroll down it lists the shortcuts
grape
grape12mo ago
that's a new one for me
Mayor McCheese
Mayor McCheese12mo ago
Prop creates a property, ctor creates a constructor, there are others like try, tryf, etc Some ides allow someCollection.for tab And it creates a for loop
mtreit
mtreit12mo ago
No description
mtreit
mtreit12mo ago
I see
Mayor McCheese
Mayor McCheese12mo ago
Try chars.for That might be resharper though
mtreit
mtreit12mo ago
Oh nice Think of the keystrokes I could have saved... Over the decades
Mayor McCheese
Mayor McCheese12mo ago
Enough keys for your whole life For
mtreit
mtreit12mo ago
catlul
Kru
KruOP12mo ago
oh wow, this blew up. I did some digging around and found out that, VS Studio does not return the {} in the code block. See below. There are short cut you can use but no easy way to do it, unless you do the whole code block using TAB, TAB. https://www.youtube.com/watch?v=1hmF00u2uF4
Andrew Renko
YouTube
How to quickly put curly braces on a new line in VS Code (no plugin...
CTRL + ← (twice) & Enter. After that, u can press ↓ to go to method's body & Tab to add the formatting indentation. Email: [email protected] Personal Facebook: www.facebook.com/profile.php?id=100003771365277 Telegram: @qwertyrecords VK community: vk.com/qwertyrecords https://www.fiverr.com/andrew_renko Instagram: www.instagram.com/andr...
Want results from more Discord servers?
Add your server