|
You can change the color of the highlighting
clicky[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Thanks. Changed it to magenta, so now its easy to spot!
|
|
|
|
|
What was the setting name you changed to do that?
Where there's smoke, there's a Blue Screen of death.
|
|
|
|
|
Tools > Options > Environment > Fonts and Colors > Brace Matching (Rectangle)
Just overlooked it myself first on first try
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Thanks for such a quick reply! > from Charlotte, NC, USA
Where there's smoke, there's a Blue Screen of death.
|
|
|
|
|
You can also use this to find the matching "{}"
On the keypad use the Ctrl key on the right side of the keyboard.
Press right Ctrl ] key combination. This will take you to the matching "{}".
|
|
|
|
|
Actually that's a closing brace for your namespace, class, method and if statement. Not much nesting at all, it just looks that way in C#
This is where I'd usually sing some VB praise, but having been away from VB for far too long I'm just not in the mood
|
|
|
|
|
Sander Rossel wrote: Actually that's a closing brace for your namespace, class, method and if statement.
Heh, good point. I usually never pay much attention to those.
Marc
|
|
|
|
|
It's one of the advantages of VB in that the end states what it's the end of. I think that just makes me a bit lazy on the formatting before coding.
|
|
|
|
|
Before they started colour matching the {}, I got into the habit fo placing a comment following the closing brace with an inverted reference to the starting brace procedure name.
The difficult may take time, the impossible a little longer.
|
|
|
|
|
Marc Clifton wrote: Dang, doesn't the IDE (dimly, I'll grant) light up the matching braces? Only when you put the cursor just after the } or just before the {. Not if the cursor is inside the block in question.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
VS is good at matching braces and so is Notepad++. But if you wany to nest things so deeply you ought to put it in a separate class or function.
I may not last forever but the mess I leave behind certainly will.
|
|
|
|
|
FWIW
In VS, set focus to a brace, CTRL_} finds the matching brace.
There are strangers on the Plain, Croaker
|
|
|
|
|
You could always:
}//End of switch logic
}//End of if peter knows jane
}//End of while loop
}//Finally! end of dam program TG Of course then you would have the never put comments in code police on your tail. Also, you'd have to pray your comments are relative to what has really ended. In case you are wondering, TG is the same as in TGIF.
|
|
|
|
|
I love the code completion features in my editors. I use Visual Studio and Sharp Develop. When I type in if and hit tab it stubs in the braces and brackets. For and if/else I use ife tab.
After the closing bracket I put in two slashes and a comment following the block. This way when I run into "dribble" (the stream of closing brackets yo showed) each on of the closing brackets hass a comment identifying what that bracket closes. It's tedious to get into the habit but it helps late at night when you are debugging things line by line and you get distracted by the family in your home office. ("Where the %^#$& did I leave off?")
|
|
|
|
|
Left brace, right brace, back arrow, code...
|
|
|
|
|
Sounds like a dance move, cha cha cha
|
|
|
|
|
That it pretty much is - definitely muscle memory at this stage.
|
|
|
|
|
Is it just me... VS2013 automatically creates the closing bracket whenever I type an opening...?
|
|
|
|
|
It does for me, also. I still have the default setup. Note that it also does that in text documents, when I don't want it to. And in code, typing the closing element can add an extra one (I think that happens if I use cursor keys to edit before closing).
|
|
|
|
|
Duncan Edwards Jones wrote: Left brace, right brace, back arrow, code...
Exactly!
Marc
|
|
|
|
|
|
Spend more time coding in C-style syntaxes rather than BASIC style ones. We're creatures of habit and muscle memory doesn't make this issue any better.
Jeremy Falcon
|
|
|
|
|
Rotate your monitor 90 degrees, to portrait orientation.
No kidding.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I have been tempted to rotate one of my two monitors, but I have to do other stuff which is best in landscape. Maybe I need more monitors! Keep up that winter tan...
|
|
|
|