tip strip

Archive for the ‘Code Comments’ Category

Notepad++ launcher batch file

The otherwise excellent Notepad++ application has an issue that sporadically causes its langs.xml file to become corrupt upon shutdown. This means that the next time you launch the application it will tell you just that, and none of your code will have syntax highlighting. I got so annoyed with it happening I knocked up the following little batch file to automatically replace the previous langs.xml file with the back-up copy, before launching Notepad++;

@echo off
cd "c:\Program Files\Notepad++"
del langs.xml
copy "langs.model - Copy.xml" langs.xml
"notepad++.exe"
EXIT /b

To use it, just create a new text file on the desktop and rename it “Notepad++ Launcher.bat”, or whatever takes your fancy – so long as it ends in “.bat”. If necessary, alter the paths to suit your chosen install directory, then save it, close it, and click on it whenever you want to launch Notepad++ with a fresh langs.xml file.

Eagle eyed viewers will note that you don’t actually have to change directory in the batch script – you could use an absolute path each time, but I like doing it the way it does it.

Home in Style

When Adobe finally killed off HomeSite a couple of months back, I had to wipe away a tear at the loss of the first proper IDE that I used for coding for the web. In truth it should have been put out of it’s misery a long time ago, as when I used it for some quick and dirty coding back in October last year I was dismayed at how dated it felt.

Upon learning of its demise, Nick Bradbury – creator of the original HomeSite – commented on his pride at the way in which the application had fostered a community of evangelists, due to the close relationship the users had with him, and later, Allaire. That was what gripped me when I first started using it, too – there were developers all over the world creating and releasing “Snippets” for HomeSite, and it just felt like we were all helping to make each other’s lives easier.

Over the last few years I’ve visited Nick’s site many times, hoping for news of him creating a modern take on what made HomeSite so good, but knowing deep down that his hands were probably tied in that regard – so long as the Macromedia, and then Adobe, were peddling the zombie descendant of HomeSite.  A couple of times I almost bought TopStyle from his site in a fit of nostalgia, but with it mainly focussing on CSS editing it didn’t deliver the full suite of features I was looking for.

Which is why it took me completely by surprise yesterday when I discovered that TopStyle 4 had been out for a couple of months and now featured tag/code insight for php and JQuery, amongst others. I was even more surprised to discover that Nick Bradbury was no longer responsible for it at all – having passed the baton on to Stefan van As, back in December.

But wow… from the screen grabs, TopStyle 4 it looked like the natural successor to the original HomeSite that I’d been waiting for and, after downloading and giving the trial version a go, I confirm that it is exactly that!

In many ways it’s the perfect riposte to Adobe’s mistreatment of its ancestor. At around £50 it’s as affordable as HomeSite was, back in the day, and undercuts the likes of Dreamweaver by quite a long way. As soon as I can afford it I’m going to buy TopStyle 4 and switch from the dated Dreamweaver 8 license I’ve been using for so long.

No harm in getting a head start

John Resig posted last night about the behind-the-scenes movement regarding HTML5 parsing, which you can apparently take for a spin by downloading a Firefox nightly build and enabling the HTML5 parsing engine.

I know I said yesterday that I wouldn’t start coding in HTML5 until it was actually an accepted standard, but I’m enjoying my front end coding so much these days that I’m going to give it a try.

Just for a look-see, mind – HTML4.1 and XHTML will do for now… but colour me impatient to start making use of all the fresh new mark-up that’s on the way.