开发者

Add special carriage return characters using a code snippet in VS

I would like to create a code snippet that produces a double slash between to marks.

For example I write one that produce

//>
   Cursor ready to edit
//_

This is useful but i want

//>
// Cursor
//_

And if I end a line between this two marks I开发者_如何学C want that the snippet create immediately two more slashes

//>
// line terminated with an Enter
// Cursor
//_

What I need is something similar to what exist with the 3 slash mark that creates the special commentary blog.

    /// <summary>
    /// text terminated with an Enter
    /// Triple slash automatically added
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>

Is that possible to be created?


If you have reached the limits of what snippets can do, you might want to try macros. Visual Studio includes several text editing macros in the samples to get you started. Tools -> Macros -> Macros IDE -> Samples -> VSEditor. For example NewCommentLine(). Copy it to MyMacros and adjust to your needs, and then assign it to a key sequence or toolbar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜