3 ms·
This is where emacs comes in. Emacs has several find and replace commands, by regex or by plain string, on a text selection, or entire file (buffer), or multipl
by henrikschroder 17y ago
This is where emacs comes in. Emacs has several find and replace commands, by regex or by plain string, on a text selection, or entire file (buffer), or multiple files. The beauty is that it works all in a interactive way, with the option to do it in batch when you press a button.
Both Visual Studio and Eclipse have these features, I'm sure there are many, many other editors and IDEs that also have them. It's not exactly rocket science.
If you want to champion Emacs, you might want to point out the features that really are unique and unmatched, instead of common features that everyone else implemented 10 years ago. Yes, yes, Emacs did it 20 years ago. Woo.
- rbanffy 17y agoMore like between 30 and 40 years ago, but yes. What makes Emacs so useful is not only what it has out of the box (it has a whole lot), but what it allows you to do with that. People often jokingly describe it as an operating system, but that's a surprisingly apt description. Everything in Emacs is accessible (most of it, anyway) and it is (a great part of it, at least) written in itself. To make a small function that searches for a, in this case, a booklike block, and replaces the classes with the proper ones is more or less a trivial task. I wouldn't use it for this case - it's too little work - but I would write a search-and-replace-with-option function that would highlight occurrences and offer me a menu of replacements. If it doesn't exist in there already. And that would also be a worthwhile exercise in IDE zen. Contrast that with Eclipse or Visual Studio, where the job of writing extensions start to look like a whole career.
- Goladus 17y agoEmacs is more than the sum of its parts. Using find-and-replace in emacs compared to find-and-replace in any other software I've ever used in my entire life (except a 90s-era hex editor for DOS called xe and that was only good for searching through hex) is like eating with real, quality, polished silverware compared to cheap plastic party utensils. I use find and replace routinely with emacs, for tasks of many sizes, almost without thinking about it.
- silverlake 17y agoKeyboard macros are a killer feature. I recently got a 10 page spec for a data file format. I didn't want to type all that stuff in. I used an OCR program to scan the text (~80% correct), then used Emacs to clean it up into a table. Then I copied a rectangle of all field names and used a keyboard macro to convert it into the XML format I required. Then I wrote a script to convert each type specifier into the type I needed. I was able to get everything working in a day.