Forum Moderators: open
I use Notepad++, which kind of does this with the "Find" and "Replace All" functions, but this only works with a small number of characters. I want to basically replace a block of code with another block of code... or just add a block of code to a specific spot without replacing anything.
Does anyone know if there is any way to do this or any program that will give me this capability?
Thanks in advance for any help.
On my mac, however, I use BBedit. Haven't quite got the hang of it yet, but it seems good.
Visual Studio has a good "find in files" and "replace in files", though I find its interface a little annoying.
Notepad++ is excellent, I love it, but watch out because it's a bit unstable and may crash half way through a S&R. If it does, it could leave your files all fubar.
OF COURSE
no one should ever be doing massive S&R functions on many many files! Use SSI - (Server Side Inclusion) instead! Keep your code modular! use require() and include() for anything that's going to be used more than once, and functions for everything else.
BBedit (Mac) has wild card features, allowing you to search and replace text even if it has some different characters, you can use # for numbers, you can use * and such.
It's for stuff like this that I still keep a copy of Homesite installed (first it was Allaire Homesite, then Macromedia Homesite, then Adobe bough Macromedia, and it vanished). Outdated, deprecated, bought out by progressively fatter software companies until it got relegated into not-quite-abandonware (ie: you can't buy it, but lord help you if you in any way violate the copyright). So don't go searching in the darker parts of the net for it, because that would be wrong >:-}
And still, hands down, the best HTML code editing software ever.Mass search and replace:
All open files (organized in tabs, years before tabs were cool).
All files in a directory.
All files in a group of directories.For old "code junkies" who never cottoned on to WYSIWIG design tools that generate their own (bloated) code, it still reigns supreme. (IMHO)
OMG! I've meet someone else that thinks this too. I've used HomeSite right from the start (when it was Allaire HomeSite) which is about 7 years now. I've tried to move away the but the search and replace has always dragged me back. Amazing feature.
I would approach this somewhat differently.I would use one of the tools above and create a library function in Dreamweaver so you can update all the code again at a later date. One you have the library include code cut and pasted, you can use Dreamweaver to expand the code and later update it.
^^^^^^ This is the best practice.
Any sections of a page that are the same like a footer or a menu should be kept as library items. It saves a lot of time.
But in order to do it on an existing site I would use Dreamweavers find and replace and for all files in the site, after I made a backup of course (c;
DreamWeaver is supposed to have a regex facility in its search and repace, but I didn't get the result I wanted (I should also say, I'm not very familiar with regex).
The ultimate search and replace IMO would be:
FIND all code that:
1.) starts with [insert your code here],
2.) has anything in the middle,
3.) ends with [insert your code here],
REPLACE with [insert your code here].
Has anyone been able to make DW do this?
If you think your way carefully through the process before you start, it can do some really neat stuff.
L8 - Saxman
the file extension for multiple files - suppose i have multiple .html pages and want to change this to to htm...etc (just an example)
that will allow you to change the file names of multiple files - say you have twenty word documents and you want to change the title for each to include the current date
guys/girls while we are on the subject do you know if any of these programmes will allow you to change:the file extension for multiple files - suppose i have multiple .html pages and want to change this to to htm...etc (just an example)
that will allow you to change the file names of multiple files - say you have twenty word documents and you want to change the title for each to include the current date
"Renamer" .. freeware. It can make all sorts of changes .. all the files in a folder. Will change extensions, '-', '_', words, case sensitive .. lots of choices. Append and prepend, all instances, first intance, etc.
Has a preview feature that lets you avoid mistakes.