Is there a macro for live templates to get only the first to letters from my username?

I want to create a live template which inserts a todo-comment.

The line should look like

//! \todo MD20110428: Here my todo-text

MD are the first two letters of my username and after that comes the current date.

Till now I wrote MD directly into the template which is OK if I'm the only one who uses it but now a colleague wants to use it either.

Is there a possibility to use substring as a macro in live templates?

1 comment

Hello Martin,

There's no such built-in macro, but you can create one via a custom ReSharper
plug-in. For an example, see LiveTemplateMacro Power Toy at http://resharperpowertoys.codeplex.com/.
Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I want to create a live template which inserts a todo-comment.

The line should look like
//! \todo MD20110428: Here my todo-text
MD are the first two letters of my username and after that comes the
current date.

Till now I wrote MD directly into the template which is OK if I'm the
only one who uses it but now a colleague wants to use it either.

Is there a possibility to use substring as a macro in live templates?

---
Original message URL:
http://devnet.jetbrains.net/message/5301677#5301677



0

Please sign in to leave a comment.