Re: JScript syntax higlihting in VIntDev
From: Roland Hall (nobody_at_nowhere)
Date: 02/12/04
- Next message: Lasse Reichstein Nielsen: "Re: How do I call a base class member function that has been overriden?"
- Previous message: Matt: "Re: change text color of a link with onclick event"
- In reply to: Roland Hall: "Re: JScript syntax higlihting in VIntDev"
- Next in thread: Ron Hinds: "Re: JScript syntax higlihting in VIntDev"
- Reply: Ron Hinds: "Re: JScript syntax higlihting in VIntDev"
- Reply: Chris Barber: "Re: JScript syntax higlihting in VIntDev"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Feb 2004 18:23:14 -0600
"Roland Hall" wrote:
: "Ron Hinds" wrote:'
: : Is there a way in Visual InterDev 6 to make the editor recognize
different
: : file name extensions and provide syntax highlighting/intellisense?
: : Specifically, I have several JScript library files in a project with the
: : extension ".JS". It would be very useful if InterDev recognized them as
: : JScript files and highlighted the syntax.
:
: In Project Explorer, right-click a .js file and choose Open With. Then
: select the HTML Editor and set the editor to come up in Source View. To
do
: this, select Tools/Options/HTML->HTML Editor. Under Initial View, Select
: Start HTML pages in Source, instead of the default, 'Design'.
:
: If your .js has:
: <script type="text/jscript"> or <script type="text/javascript"> then you
: will get the color syntax coding and intellisense. However, generally
these
: files are used as links so you will have to comment those out before using
: them in your code as a linked .js file.
:
: There is a ZD Journal Tip that says you can use just //SCRIPT to activate
it
: but that doesn't work for me.
: http://msdn.microsoft.com/vinterdev/technical/tips.asp - The heading is:
: Color-Coding in Script-Only Files
:
: I use my .js files as:
:
: <!--
: function ...
:
: //-->
:
: If I include //SCRIPT, I get the color of the comment codes and the
default
: comment color, but the syntax is not color coded.
:
: If I use:
:
: <script type="text/jscript">
: function ...
:
: </script>
:
: ..then I do.
:
: However, to use the code linked in a file, then I have to remove the
script
: tags or comment them out.
:
: Document to link script (*.html, *.asp)
: <script type="text/jscript" src="somescript.js"></script>
:
: somescript.js - design time
: <script type="text/jscript">
: <!--
: function doThis() {
: ...
: }
: //-->
: </script>
:
: somescript.js - run time
: <!--
: function doThis() {
: ...
: }
: //-->
Dayum. You would know I'd figure it out after I posted! grrrrrr....
Ok, you have to do this in the following order. I can't tell you why.
You still have to set the IDE as I mentioned but on your page...
Start with:
<script
After you press the t, the color will enable.
Now, put js comment marks before the tag...
You should have this:
//<script
You cannot put the <!-- before it or it will comment the code and you'll get
that default color.
You also cannot start with // and then type in <script. So, it appears it's
FIWINS (First In Wins!)
HTH...
-- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp
- Next message: Lasse Reichstein Nielsen: "Re: How do I call a base class member function that has been overriden?"
- Previous message: Matt: "Re: change text color of a link with onclick event"
- In reply to: Roland Hall: "Re: JScript syntax higlihting in VIntDev"
- Next in thread: Ron Hinds: "Re: JScript syntax higlihting in VIntDev"
- Reply: Ron Hinds: "Re: JScript syntax higlihting in VIntDev"
- Reply: Chris Barber: "Re: JScript syntax higlihting in VIntDev"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|