Fog Creek Software
Discussion Board




Simple Question

In Mozilla, how do I change the default setting of View | Page Source so that I can use the text editor of my choice and not Mozilla's?

In Netscape 4.x all one had to do was click Edit | Preferences |  Composer. Then under External Editors click Choose.

Thanks for the help.

Chi Lambda
Thursday, November 21, 2002

You don't appear to be able to do it. But at least you're better off with Netscape than you are with IE which always uses Notepad for viewing the source.

You could use a hyperlink to your preferred html editor and then copy and paste the page in. You could propbably write a quick script to automate the process.

Stephen Jones
Thursday, November 21, 2002

> IE which always uses Notepad for viewing the source.

For IE6, this can be configured by editing/creating the Registry key "HKLM\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name" and setting the (Default) string value at this key to the filename of the editor you want to use.

The XP version of TweakUI will do this for you.

I'm not sure if it applies to earlier versions of IE.

-Michael

Michael Josephson
Thursday, November 21, 2002

Maybe I can change the text-editor by adding a line to the "hidden preference"/ user.js file?

http://www.mozilla.org/start/1.0/faq/general.html#1.5

Why is this so complicated? :-)

Chi Lambda
Thursday, November 21, 2002

http://bugzilla.mozilla.org/show_bug.cgi?id=8589

Or in other words, you can't at the moment.

Inigo
Thursday, November 21, 2002

Ingo: Thanks.

Mozilla as my default browser is gonna have to wait.

Chi Lambda
Thursday, November 21, 2002

***
Mozilla as my default browser is gonna have to wait.
***

[sarcasm]
Oh yeah!  That darn "can't open the html source in my text editor of choice" is a show-stopper!!!  I can totally understand why you wouldn't switch.

That Microsoft they are so smart!  They identified that they could increase the number of IE users by letting them open up the html source in something other than notepad.  Who needs tabbed-browsing or integrated pop-up blocking?
[/sarcasm]

Ok...on a serious note.  I have used Phoenix (the "browser-only" version of Mozilla) ... and I love it.  Tabbed-browsing sounds "minor", but I would now never use a browser that DIDN'T have it.  The pop-up blocking is wonderful, also.

William C
Thursday, November 21, 2002

>> "They identified that they could increase the number of IE users by letting them open up the html source in something other than notepad."

If you develop and design websites for fun or for work it really helps productivity.

Sure, I could forgo it, but I click the Edit button in order to access my (ASP) work in EditPlus (a very good text-editor) hundreds of times a day. If I may be so bold, I think Joel would support my ideas:

"So that's what days were like. A bunch of tiny frustrations, and a bunch of tiny successes. But they added up. Even something which seems like a tiny, inconsequential frustration affects your mood. Your emotions don't seem to care about the magnitude of the event, only the quality.

"And I started to learn that the days when I was happiest were the days with lots of small successes and few small frustrations."

[ from the book _User_Interface_Design_for_Programmers_ http://www.joelonsoftware.com/uibook/chapters/fog0000000057.html ]

Chi Lambda
Thursday, November 21, 2002

I know, I know...I was just joshing with you.

But, also, I have done web-site development ... and I never remember going to our website (www.websiteImWorkingOn.com) and clicking on the edit button to get at the source code.

If you are on Windows OS, for example ... I usually get at my source code using NT Explorer.  I would be in the folder of the current project and I would double-click the icon and the default application would be launched.

I usually would usually have a browser open to see the results and my editor open.

I make the changes in my editor, Ctl+S, Alt+Tab to browser, Crtl-R (refresh).

I'm guessing you are trying to keep just one window open?  So you view your changes in the browser, edit to get to your text-editor ... but then ... you have two windows open just like me!

I'm confused.  Seriously.  Are you closing your editor 100's of times a day?  And after you close it you have to re-open it (using the edit of a browser) to make more changes?  Stop closing your editor! :)

I think I'm missing something here.

William C
Thursday, November 21, 2002

To add:

The reason I was joshing you, is that my personal experience is that the only time I've ever used the "View Source" on any browser was to get at someone else's source code (another website).  And that doesn't happen often (even when I was doing web development).

I'm not sure how you don't work with a text-editor open (to make changes) and a browser open (to view changes).

There really is a disconnect for me.  Why is it necessary to use the "View Source" feature of your browser during the development of your own source code?

William C
Thursday, November 21, 2002

William C:  I don't understand your criticism, especially when you admit that you would not use a browser that didn't offer tabbed viewing.

I have had a similar problem with the built-in editor, and it is a major reason I don't use Mozilla.  I'm sure that is was one of those situations where they couldn't fit it into the first release.  Fine, I'll wait for the release where it is available. 

Like Joel <a href="http://www.joelonsoftware.com/articles/fog0000000020.html">says in another article</a>, "So you convince yourself that you only need to implement 20% of the features, and you can still sell 80% as many copies. Unfortunately, it's never the same 20%. Everybody uses a different set of features."

Lydia
Thursday, November 21, 2002

Whoops, sorry about that funky link - I didn't see the note about HTML!

Lydia
Thursday, November 21, 2002

Lydia,

sorry about the "criticism".  I didn't mean it to be "criticism", I was just joking around with my first comments (thus, the sarcasm "tags" followed by the "Ok...seriously").

But now, I'm just curious.  Seriously.  Because like I said, I've never really had to use the "View Page Source" during the development of any html that I have done.

If you and he both use this feature.  I'd like to figure out how and why ... I could possibly benefit.

Obviously tone is something that is hard to interpret through a message board ... but "wear a helmet" I say! :)

If you or he comes back with ... "using view page source helps me out in this exact way and saves me time because of this way" ... well, I'll be the first to say "awesome! thanks for the tip".  Then everybody reading this thread benefits.

I'm just trying to discuss something I am now officialy curious about (the infamous and exceptional "View Page Source" feature).  Especially now that 2 people have chimed in and told me its a life-saver.

===

Also, tabbed browing.  I know people have their own preferences ... but gosh, golly...I can't imagine that people love having 23,000 (hyperbole alert!) windows open during a session of web-surfing.  I love being able to close one window. :)

William C
Thursday, November 21, 2002

Most .html editors including the much-maligned Front Page and Arachnophilia have browser previewing built in.

So like William, I would never use the browser to access web pages and then open the view source for editing, but would open the Html editor and use the browser preview feature for viewing.

The reason for tabbed browsing is bandwidth limitation (either your bandwidth or the server bandwidth). I would go to a site such as Joel's or the Register, and click on half-a-dozen links or so to open in a new window. Thus I would have something to read whilst the others were loading.

The problem with "open in a new window" is that you end up with twenty or thirty icons in the taskbar, and don't know which belong to which site. With tabbed browsing I just have  three or four  icons, one for each site, and then I open each and have the separate messages all there.

I changed over from Netscape 4 to Internet Explorer 5 beta four and a half years ago because of the "save web page complete" feature. I just changed back to Netscape two weeks ago because of the tabbed browsing.

Oftne there is one feature that is sufficient to make you change over.

Stephen Jones
Thursday, November 21, 2002

"I'm not sure if it applies to earlier versions of IE."

yep, you can. don't know the registry key right now, as it might be different, but I use vim/gvim on my 'winders' boxes and on both IE6 and IE5.5 setups, viewing source launches gvim for me.

At least for gvim, there's a trick you need for 5.5 but not 6. The problem is that the path to gvim.exe on the computer contains spaces and so somebody who came up with this tip (where I found it) on vim.sourceforge.net wrote a vbs script that the registry key actually points to, and the vbs script actually launches gvim.exe.

My opera makes it really easy  - I can select gvim in the preferences directly.

anonQAguy
Thursday, November 21, 2002

William:

I wasn't offended at all. I've been through fraternity initiation and army basic training (which is kinda the same) -- so I've got a pretty thick skin. :)

When I work in ASP development I work like you said: text-editor open, browser open; save in one, refresh to view in other.

But as it happens, I am working with a company that has a lot of legacy code in HTML, JavaScript and CSS -- all of which I maintain. Since that stuff is client-side (unlike ASP) I like to view in browser, click Edit to open that page in my text-editor of choice, code, save and view. That, and I like to view the source of other sites too -- in order to learn.

Chi Lambda
Thursday, November 21, 2002

What's wrong with composer for viewing other sites code. You can always change the color coding in preferences if that makes it easier.

Then you could use Mozilla as your standard browser for surfing the web, and IE for the particular pages you have to maintain.

Stephen Jones
Thursday, November 21, 2002

As to why 'View Source' is useful to some:

When developing jsp's, the output can sometimes be not-quite-what-you-expect. In IE, when your server-side generated table is screwed because your code forgot to spit out some tags, its difficult to figure out where the code went wrong. Open it up in View Source, and then it's easy to notice you have two < tr > for every < /tr > and that's why IE is gettting confused.

anonQguy:
If a 'feature' is giving you problems because there are spaces in a path, you can always use the old dos 8.3 name. Do 'dir /x' in a command prompt and it'll tell you what the short name is.

HTH

Yves

Yves
Friday, November 22, 2002

anonQAguy: if you have trouble with paths in spaces put double quotes around them. e.g.:

"C:\Program Files\My App\MyApp.exe" /switch1 /switch2

Duncan Smart
Friday, November 22, 2002

Yves:

Regarding your comment, I do it too:

>> "When developing jsp's, the output can sometimes be not-quite-what-you-expect. In IE, when your server-side generated table is screwed because your code forgot to spit out some tags, its difficult to figure out where the code went wrong. Open it up in View Source, and then it's easy to notice you have two < tr > for every < /tr > and that's why IE is gettting confused."

Chi Lambda
Friday, November 22, 2002

*  Recent Topics

*  Fog Creek Home