Sunday, February 18, 2007

Notepad++ for Dummies

Say, just for the sake of argument, you need to swap out all the internally linked images on a webpage for externally hosted ones.
Now assume that while you may not be the smartest man in the world, you are capable of learning through trial and error.
Pretty quickly, maybe even before you start, you realize that you'll be wanting to use find-and-replace. That's a good start.
So what are you going to 'find'? I know, how about 'src'? That's a decent idea. All of the image locations you want to replace immediately follow 'src'. So now all you have to do is keep hitting 'find next' and then paste in the desired image url. Nice!
So now you are cruising through replacing locations, and bingo, you're done!
Let's say that now, you have another page to perform the same treatment on - only this time there are a lot of images to replace.
Now lets pause for a minute and make another assumption: You are lazy.
In a panic, you think to yourself 'There has got to be an easier way!'
You notice that all the image locations look something like this:

img src="images/judysbook.png"

You want the link to look like this:

img src="http://deals.judysbook.com/images/judysbook.png"

You think a little bit and scratch your head. Then you realize that instead of finding 'src' you can find-and-replace 'images/' with 'http://deals.judysbook.com/images/
Simply punch Replace All, and Voila!

This, uh, happened to this one, uh, friend of mine.

No comments: