how to show line numbers for TT files in Visual Studio 2012 Professional

Jan 11, 2013 at 6:02 PM

All --

Please help.

I need to know how to show line numbers for TT files in Visual Studio 2012 Professional.

Do you know?

Please advise.

(Please note that I already have line-numbers turned for all languages listed in Tools, Option, Text Editor-- but they do not show up for files with a TT extension.)

Thanks.

-- Mark Kamoski

Coordinator
Jan 12, 2013 at 8:26 PM

I currently use the plain text editor in Visual Studio to edit my T4 files. The "Line numbers" option under Text Editor / Plain Text / General / Display controls display of line numbers for .tt files. However, this may not work depending on the particular extension you may be using for T4 files. Tangible T4 Editor at some point was a complete replacement for the built-in editor and didn't support the standard options in Visual Studio.

Jan 14, 2013 at 1:39 PM
OlegSych wrote:

...this may not work depending on the particular extension you may be using for T4 files...

...Tangible T4 Editor at some point was a complete replacement for the built-in editor and didn't support the standard options in Visual Studio....

Dear Oleg --

I appreciate your kind and excellent reply.

Regarding file extensions, I am using ".TT" as the file-extension for my T4 templates. It seems that Visual Studio does not understand that files with a ".TT" extension should get line-numbers. That is odd, to me, given that Visual Studio knows what TT files are. What they hey-hey-- Visual Studio actually creates TT by itself in certain cases. It would be nice if I could tweak the file extension mappings somewhere and ask Visual Studio to treat TT files with line-numbers in the editor. However, maybe this no-line-numbers issue in Visual Studio is due to the Tangible editor override issue that you mention. Oh well.

Regarding Tangible T4 Editor-- yes, I am using it (because it is awesome). I am using the free version. So, maybe it is that Tangible overrides the editor and thereby causes the no-line-numbers issue in some way. I rely on the Tangible T4 Editor because coding is very slow without the syntax highlighting and IntelliSense support that it provides. Oh well, yet again.

If you know of a workaround, etc, then please let me know.

Thanks.

-- Mark Kamoski

Jan 14, 2013 at 2:39 PM

Dear Oleg (and all) --

FYI, I wrote to Tangible about this.

http://www.tangible-engineering.com

They said...

If you are using the latest version, you can go to the tangible Options Page (Tools->Options->tangible T4 Editor->Editor) and setShow line numbers to True.

...and sure enough it WAS that simple.

How sweet.

How good are those folks at www.Tangible-Engineering.com ??? 

Pretty darn hella good, that's how good.

:-)

What is also to Tangible's credit that (1) they replied to my email in less than an hour AND (2) they are in Germany and I am in the United States AND (3) I have the free-version of their tool.

Mystery solved and case closed.

Thanks.

-- Mark Kamoski