Adds XML documentation comment tags in currently active IDE window (LibreAutomete, Visual Studio, etc).
Import the attached file (how). Recommended destination folder: \@Triggers and toolbars\Functions
Example. Paste in file "Hotkey triggers".
Also paste this at the start if file "DocComment.cs" is not in the same project folder.
Changes
2023-05-27. Supports multiline selection. Added <para> example.
Import the attached file (how). Recommended destination folder: \@Triggers and toolbars\Functions
Example. Paste in file "Hotkey triggers".
//these 2 lines are optional
DocComment.FocusCodeEditor = () => DocComment.FocusCodeEditorDefault(); //note: may need to set the VS hotkey
DocComment.IsMarkdown = () => DocComment.IsMarkdownDefault("Ctrl+Shift+Alt+7"); //note: need to set the VS hotkey
#region Alt
Triggers.Of.Window(of: "**m Au.Editor.exe||devenv.exe||code.exe");
hk["Alt+?"] = o => DocComment.ShowTriggers("Alt");
hk["Alt+B"] = o => DocComment.Tag(s => $"<b>{s}</b>", s => $"**{s}**");
hk["Alt+I"] = o => DocComment.Tag(s => $"<i>{s}</i>", s => $"*{s}*");
hk["Alt+C"] = o => DocComment.Tag(s => $"<c>{s}</c>", s => $"`{s}`");
hk["Alt+P"] = o => DocComment.Tag(s => $"<para>\r\n{s}</para>");
hk["Alt+S"] = o => DocComment.Tag(s => $"<see cref=\"{s}\"/>");
hk["Alt+E"] = o => DocComment.ExampleCodeOrException();
hk["Alt+<"] = o => DocComment.HtmlEncode("<");
hk["Alt+>"] = o => DocComment.HtmlEncode(">");
hk["Alt+7"] = o => DocComment.HtmlEncode("&");
hk["Alt+Q"] = o => DocComment.HtmlEncode();
hk["Alt+T"] = o => DocComment.HtmlTable();
hk["Alt+L"] = o => clipboard.paste("<br/>• ");
#endregion
Triggers.Of.AllWindows();
Also paste this at the start if file "DocComment.cs" is not in the same project folder.
Changes
2023-05-27. Supports multiline selection. Added <para> example.