I'm Jeff-Relf.Me, in Seattle, Early 2024, born in Seattle, 1960.
My Mouse/Keyboard Layout.
<Sergey Vlasov's Visual Commander, Professional Edition>
lets me assign up to 99 macros to keys/buttons[*].
[ *: Screenshot of my toolbars, Visual Studio Community 2019
<Snippets.TXT, My C# macros, to automate VS_2019>
After making changes to my hand_crafted macros ( Snippets.TXT ),
I copy it to the file that Visual Commander uses:
%LOCALAPPDATA%\Sergey Vlasov\Visual Commander\1.0\Snippets.vCmd
My "Open File" macros are in a "New Menu", on my toolbar.
"File > Recent Files List" fills a similar "New Menu". ]
Also, Visual Commander comes with -essential- ( to me )
extensions; one hides the "Sign in" button.
See "Hide Menu bar and MainTitle bar" in:
Snippets.TXT, My C# macros, to automate VS_2019.
I love having all my macros & extensions in a single text file, like that.
Visual Commander's macro editor uses the standard text/code editor,
with <the fonts/sizes you normally use>[*].
[ *: For me, C# macros ( .CS files ) open as "PlainText";
see: "Open these file types in the PlainText editor" in Win10.REG(.TXT).
<ScreenShot of my source code.>.
<My "console" (z1.HTM)> colorizes the '0' glyph, <Screenshot>. ]
For me, F7 starts/stops recording, F8 plays it.
The macro recorder has -many- faults; but macro
editing/assignment matters more than keystroke recording.
For example, This toggles "Line Wrapping" On/Off:
EnvDTE.Properties jEd = DTE.get_Properties( "TextEditor", "C/C++" );
EnvDTE.Property WordWrap = jEd.Item("WordWrap");
WordWrap.Value = !(bool)WordWrap.Value ;
jEd.Item("VirtualSpace").Value = true ;
For "PlainText", instead of "C/C++", use:
EnvDTE.Properties jEd
= DTE.get_Properties( "TextEditor", "PlainText" );
EnvDTE.Property WordWrap = jEd.Item("WordWrap");
WordWrap.Value = !(bool)WordWrap.Value ;
jEd.Item("VirtualSpace").Value = true ;
// System.Threading.Thread.Sleep(2000);
try { DTE.ExecuteCommand("Edit.StopOutlining"); } catch { }
FYI, This toggles "ShowHorizontalScrollBar" On/Off:
EnvDTE.Property hScroll
= DTE.get_Properties( "TextEditor", "PlainText" )
.Item("ShowHorizontalScrollBar");
hScroll.Value = !(bool)hScroll.Value ;
EnvDTE80 bugs:
"DTE.Find.Execute()" changes your find_history/find_settings.
Solultion: use "DTE.Find.FindReplace()" instead.
Put "Not Found" messages in the <StatusBar>:
DTE.StatusBar.Text = @" Not a ■⏎⏎■⏎ file." ;
< DTE.ItemOperations.OpenFile("C:/__/z1.HTM"); >
no longer works properly because the edit_tab
never gets updated when it's changed
by something outside the editor.
Solultion, use this instead:
< DTE.ExecuteCommand("File.OpenFile", "C:/__/z1.HTM"); >
This (below) no longer works because, after a "File.SaveAll",
your edit window doesn't show ExternalCommand1's changes:
DTE.ExecuteCommand("File.SaveAll");
DTE.ExecuteCommand("Tools.ExternalCommand1");
Use this instead:
DTE.ExecuteCommand("File.SaveAll");
System.Threading.Thread.Sleep(2000);
DTE.ExecuteCommand("Tools.ExternalCommand1");
Or just:
DTE.ExecuteCommand("Tools.ExternalCommand1");
■