I am looking to start creating some CR templates to fit with my style of coding (such is the power of coderush).
I tried a dummy one yesterday and made an auto prop with two fields, one for the type and one for the name.
This worked as expected with one flaw...
In coderush when I expand a built in template it sets the cursor to the first field. Mine does not, It sets the cursor at the end of the line
Private <<Field(Type)>> <<Field(Name)>> {get; set}
PS: Does anyone know how to type out those teeny tiny angle brackets that they use?
To initialize the caret position, use the Caret text command. To perform the selection, utilize the BlockAnchor text command in coalition with the Caret text command. As a result, your template will look similar to this one:
Private «Caret»«Field(Type)»«BlockAnchor» «Field(Name)» {get; set}
P.S. I'm pasting the template expansion right from the CodeRush Templates Editor, so they are pasted as is. To type those characters here, simply specify their HTML name, for example "laquo" (left double angle quotes) preceeding with & and followed by ; characters (e.g. "& laquo ;"), remove spaces and get this character: «