jEdit Community - Resources for users of the jEdit Text Editor
Global Search and Replace Without Opening Buffers
Submitted by proee on Wednesday, 22 April, 2009 - 22:45
I'm wondering if it's possible to do a "Search and Replace" in a directory without having jEdit open a buffer with the files matching the search criteria.

I'm looking for a way to do a "silent" search and replace where jEdit will make the changes, and save the file, all without opening a buffer (which it's currently doing).

In my case, i have a good 30 files with the matching criteria so when I do a "search and replace" in a directory this opens up 30 buffers.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Macro
by elberry on Fri, 24/04/2009 - 18:47
You might be able to do this using a macro. I know you can use the search and replace functionality programmatically from a macro, but I'm not sure if it opens all the files found.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
No
by Robert Schwenn on Thu, 23/04/2009 - 20:02
I don't think that there is a way to do so. But - so, what? Eye-wink
You can do "File -> Save all" and "File -> Close all" after the replace.

Robert
 
Still looking for a solution...
by proee on Mon, 27/04/2009 - 16:56
Well, I've tried doing this for a while, but having it open 100 tabs is a bit crazy to say the least.

Any jEdit power users out there that can recommend a good way to go about doing this?

Could someone provide a basic macro script as mentioned above that might be able to do a global search and replace in all files of a directory and subdirectory without opening the buffer?
User login
Browse archives
« April 2024  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293