【发布时间】:2016-10-03 14:53:37
【问题描述】:
我正在尝试使用 Visual Studio 宏编辑器
https://visualstudiogallery.msdn.microsoft.com/d3fbf133-e51b-41a2-b86f-9560a96ff62b
它允许用户在 javascript 中编写宏来驱动 IDE。我想做的是编写一个格式化文本的宏
public void Foo(
int i,
int b,
int c)
到
public void Foo
( int i
, int b
, int c
)
如果我只知道执行以下操作的命令,这应该很简单。
(1) Move the cursor to the next matching character, and detect if it is not found
(2) Insert a carriage return
(3) Join lines together
我已经做到了
dte.ExecuteCommand("Edit.Find");
dte.Find.FindWhat = ",";
但希望有人比我更了解他们的 DTE 命令。
【问题讨论】:
标签: visual-studio macros