Page 1 of 1

Document Type for "View Source" ?

Posted: Sat Sep 27, 2003 7:14 pm
by mo
Just making trouble here. Does anyone have an idea how to set up syntax highlighting for the files that come up when you "view source" on an .html page?

I don't see a document extension for these files.

Posted: Sat Sep 27, 2003 8:17 pm
by s_reynisson
I just got rid of text.syn under
Configure -> Preferences -> Document Classes -> Text.
Now I'm using html.syn there so when I have a document
without an extension, like in view source from IE, I'm getting
the syntax colors. Besides, all text.syn did for me was to
highlight URL's and html.syn takes care of that 8)

Posted: Sat Sep 27, 2003 9:03 pm
by mo
s_r,

Thanks for the response, but no luck for me. It works on .txt files ok, and I will keep it for that, but it doesn't do anything for the i.e. view source file that comes up...and default doesn't seem to allow syntax highlighting.

Posted: Sun Sep 28, 2003 7:20 am
by bbadmin
The View Source command in IE creates a temporary file, without a file extension. Therefore, you need to add "*." to the list of members of the HTML document class to get them to be highlighted. If that is already a member of another document class, you'll need to delete it from that class.

Keith MacDonald
Helios Software Solutions

Posted: Sun Sep 28, 2003 7:51 am
by MudGuard
With all the Internet Explorers I know the temp file has
[1]
(or some other number) at the end of the file name.

*].
is working as well and does not catch Unix shell scripts - just make sure no document class with the more general *. is below the html document class (by renaming if necessary)

Posted: Sun Sep 28, 2003 12:35 pm
by mo
Thanks for the responses, MudGuard and admin. I went with adding *]. to the files for the TEXT document class and it seems to be working fine.

OT: I see what they are talking about when they say that EMACS is becoming an operating system. I begin to see everything through TextPad.