Sublime Forum

Search and replace in all files

#1

Is it possible to do a search and replace in all files? I haven’t figured out how to do that.

0 Likes

Global Find/Replace
#2

No, it’s not possible. You can do a find but not a replace.

0 Likes

#3

+1 would love to see this feature. No editors I know of, except TextMate, really get this right.

(I’m an old-hand emacs user; lack of a meaningful multi-file F/R except via obscure dired commands is… crazy!)

0 Likes

#4

+1 for find and replace in whole project

0 Likes

#5

it’s as simple as doing a sed command on an entire directory or Perl if you’re into that sort of thing:

sed -e “s/OLDSTRING/NEWSTRING/ig” * should get you there.

perl -p -i -e ‘s/oldstring/newstring/g’ * will do it for Perl

On Windows, make sure you have Sed or Perl

Since we’re using Python, doing a recursive regex replace shouldn’t be too hard.

-Jim

0 Likes