Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editor - bracket intellisense?
Message
From
25/07/2003 11:03:45
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00813360
Message ID:
00813500
Views:
10
Thanks, Neil. I looked at the macro record thinking of something like this, but couldn't figure out how to run it from a keystroke as picking in off a menu or whatever would be more of a hassle than doing it manually.

Wonder how the guy who wrote sharpeditor did it. Seems like such an obvious intellisensy kind of thing I was really surprised VS .NET didn't just do it by default.

>Charles,
>
>VS.NET macros allow you to augment the standard behaviour and create things like code generators etc. You could quite easily create/record a macro to simulate the functionality required.
>
>The following is a simple recorded macro (except for the addition of the SmartFormat() call) that emulates the closing brase. Obviously this took about 10 seconds and is a solution worthy of 10 seconds worth of input but it illustrates the point.
>
>DTE.ActiveDocument.Selection.Text = "{"
>DTE.ActiveDocument.Selection.NewLine()
>DTE.ActiveDocument.Selection.Text = "// Insr"
>DTE.ActiveDocument.Selection.DeleteLeft(4)
>DTE.ActiveDocument.Selection.Text = "TOFD"
>DTE.ActiveDocument.Selection.DeleteLeft(2)
>DTE.ActiveDocument.Selection.Text = "DO:"
>DTE.ActiveDocument.Selection.NewLine()
>DTE.ActiveDocument.Selection.Text = "}"
>DTE.ActiveDocument.Selection.LineUp()
>DTE.ActiveDocument.Selection.EndOfLine()
>DTE.ActiveDocument.Selection.NewLine()
>DTE.ActiveDocument.Selection.SmartFormat()
>


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform