does anyone know how i can map EJS to visual studio to act like a HTML file. I think i managed to do it but its got a lot of bloat in it.. Its basically an HTML file without the
This requires creating a custom intellisense and validation schema. Here are the steps on how to go about doing that.
common7\packages\schemas\html directory of your Visual Studio installation. On my machine this is: C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\schemas\htmlhtml_401.xsd and name it EJS.xsdhtml-401 with EJSvs:ishtmlschema to "false"vs:SuccinctFriendlyName to "EJS"*.reg text file. If you choose, the latter, name the file EJS.reg and add this to it:Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{1B437D20-F8FE-11D2-A6AE-00104BCC7269}\Schemas\Schema23]
"File"="html\\ejs.xsd"
"URI"="http://schemas.microsoft.com/intellisense/EJS"
"Friendly Name"="EJS"
Visual Studio 2008 ships with 22 schemas, that's the reason why you this as "schema23", if you installed a 3rd party schema editor, that name may already exist (check that registry key if you want to be sure).
Once this is done, restart Visual Studio. Associate the *.ejs extension with "HTML Editor" instead of the "User Control Editor". Now, when you open or create a file with a *.ejs extension, you should see the "Target Schema For Validation" drop down in the "HTML Source Editing" toolbar. (if you don't see that toolbar, go to View->Toolbars->HTML Source Editing).
You will notice that you can start using HTML tags without having to start with the tag as your first one. Intellisense will also work for javascript inside a tag.
This is not a complete solution, but it will put in the right direction to achieve your end goal. You will still need to go back and tweak the EJS.xsd file and make more modifications to get to behave exactly as you want it.
Once you get that sorted out, you can create a simple script that copies the EJS.xsd file and creates the registry key in another machine.
(Fine Print: Always back up your registry before messing with it)