Problems using MS Notepad for HTML and programming editing
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
I ran across this problem yesterday, a web designer I was talking to was having a script execution failure, he was working in notepad, thinking that it is a neutral text editor, which I also thought it was, though I never use it.

At some point he had accidentally hit some key combination and inserted some type of proprietary MS character, the problem was that notepad simply ignored it, so he couldn't figure out what was causing the error. In this case it was the
:: Code ::
header information has already been sent, cannot resend headers


in PHP, which almost always means that some space or character was inserted before the first <?php on the page.

In notepad, there was no indication of this however, it looked like <?php was the very first thing on the page.

When I opened up the page html in a real text editor, however, I immediately saw that there was a special character string right before the <?php, I don't remember, a 3 character string made up of odd characters, this was invisible in Notepad.

the lesson? Don't use Microsoft products for anything web related, they don't work, and add extra junk, don't tell you, or let you see that. I had him download a real text editor, Edit Plus in this case, though Crimson Editor, which is the free version of Edit Plus from what I can see, would have also done fine.

Now he has the following features available:

  1. All characters always displayed
  2. Line numbering (how can anyone do programming or real css/html without line numbering, errors are almost always reported by line number?)
  3. Syntax highlighting
  4. Tab size control, I set mine to = 2 spaces, this makes working with all indented material much easier.
  5. Real search and replace, over multiple files, with almost unlimited memory for undoing and redoing, for each open file. This is invaluable when you make a very bad mistake on a program and have to return to the last step it was actually working.
  6. Site and project management (a weak area of the older Edit Plus since it doesn't let you just assign a site folder, requires loading each file as a project file manually, hopefully the new EditPlus will take care of this problem.
  7. HTML, PHP, Javascript etc templates.
  8. and more features, too many to list, all contained in a tiny, about 1 mB application.


The moral of the story? Don't handicap yourself thinking that notepad is somehow a 'pure' text editor, it's not, it's just another mediocre MS product that doesn't do anything particularly well.
Back to top
MatthewHSE
Status: Contributor
Joined: 20 Jul 2004
Posts: 122
Location: Central Illinois, typically glued to a computer screen
Reply Quote
Useful information here. I always use EditPad Pro, which has some really nice features, including a new "Clip Book," in which you can store commonly-used blocks of text. It opens in a sidebar and you can double-click an entry to insert it on the page. I use it for doctypes, basic CSS files and webpage layouts, etc.

EditPad only takes about 700kb of diskspace, so I have actually created a backup "install" on my webserver, so I can access and use it remotely if I ever need to.

Notepad is simply lousy anyway; no user-friendly features like automatic indent, multiple files, etc.
Back to top
minck
Status: Interested
Joined: 02 Nov 2004
Posts: 39
Location: Belgium
Reply Quote
I really dig jedit for windows - it works on linux too, so you get the same editor on both of your systems (though in *nix I use quanta or kate mostly). Jedit also does bracket-brace-parentheses matching, something you don't find in many windows editors.
Back to top
vkaryl
Status: Contributor
Joined: 31 Oct 2004
Posts: 273
Location: back of beyond - s. UT, closer to Vegas than SLC
Reply Quote
Gonna check out jedit, minck, thanks! Especially since I'm headed toward migrating to linux this winter....
Back to top
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
Have just landed, hi minck, hi vkaryl

I'll have to check out jedit, kate is really nice too, the only thing it's missing [or am I missing something?] is multiple line search and replace.

But Kate is a very impressive program, I'm looking forwards to learning more on this stuff.
Back to top
jalarie
Status: Interested
Joined: 16 Sep 2005
Posts: 11
Reply Quote
jeffd, The extra three character string is refered to as the Byte Order Mark (BOM) by the standards people. It allows systems to recognize how a page is encoded. ASCII is nice; utf-8 and utf-16 have interesting traits; and others are usefull for special occasions. The utf-8 BOM is hex EFBBBF.

Because this is a code for communication between computer programs, those which recognize it do not, normally, display it to the user. I've found that the good, old DOS editor can be very helpfull in finding strange characters if you use it in binary mode:

edit /78 filename
Back to top
vkaryl
Status: Contributor
Joined: 31 Oct 2004
Posts: 273
Location: back of beyond - s. UT, closer to Vegas than SLC
Reply Quote
Talk about resurrected ancient threads! I've moved to notepad2 lately. Great little program!
Back to top
englishextra
Status: Interested
Joined: 25 Dec 2007
Posts: 11
Location: Moscow, Russian Federation
Reply Quote
Notetab light (free) and pro have helped me a lot. Very compact with clip book. Unfortunately, no syntax highlighting available as that of jEdit has. Jedit is too slow.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours