how can I get intellisense in a T4 template?
You can just download tangible's T4 Editor at t4editor.tangible-engineering.com it has Intelli-Sense for most important namespaces also in the FREE EDITION.
Resharper can do this, with the help of the ForTea Plugin that adds support for editing T4 (.tt) files.
You can purchase the professional version of T4 Editor. It works very well in standalone .tt files, but unfortunately, due to the differences in how the pro version of T4 Editor and T4 itself compile the templates, you will get false errors reported for this tutorial, which relies on T4 Toolbox.
http://visualstudiogallery.msdn.microsoft.com/en-us/60297607-5fd4-4da4-97e1-3715e90c1a23
Here you go with a plugin...
Vaseem.
EDIT
Also available for Visual Studio 2012: Tangible T4 Editor 2.3.0
Also available for Visual Studio 2015: Tangible T4 Editor 2.3.0
Also available for Visual Studio 2017: Tangible T4 Editor 2.4.0
Also available for Visual Studio 2019: Tangible T4 Editor 2.5.0