afrog icon indicating copy to clipboard operation
afrog copied to clipboard

Find/replace not working with PHP vars (whole word)

Open Sogl opened this issue 11 years ago • 9 comments

Hi!

I use Atom 1.0 on Windows 7 x64.

Whole word option is enabled. If I try to replace some variables in PHP with $, replace doesn't work. Works only without $. Also find don't working with $.

Sogl avatar Jul 06 '15 00:07 Sogl

@Sogl Hello! Don't you have regex option turned on? Because without regex it seems to be working for me, but with regex it won't work as you may expect as $ is a special symbol matching the end of a string and it that case you need to escape it (e.g. \$variable).

kubetz avatar Jul 06 '15 00:07 kubetz

Don't you have Regex option turned on?

Nope. Regex option disabled.

Sogl avatar Jul 06 '15 00:07 Sogl

  1. When you run atom in safe mode using atom --safe are you still getting this strange behavior?
  2. Can you show example when this is hapenning? I did simple search / replace for $variable and it worked for me :confused: .

kubetz avatar Jul 06 '15 00:07 kubetz

  1. When you run atom in safe mode using atom --safe are you still getting this strange behavior?

How to do this on Windows? If I type "atom" in command line, I see error:

"atom" is not an internal or external
command, operable program or batch file.

Maybe some PATH missing?

  1. Can you show example when this is hapenning? I did simple search / replace for $variable and it worked for me

I type some $var and try to find/replace - nothing. Same with other vars in file. Works only without "whole word" option.

Sogl avatar Jul 06 '15 00:07 Sogl

Strange, Atom installer should add the installation directory to PATH environment variable.

Go to C:\Users\<name>\AppData\Local\atom\app-1.0.0. There should be the executable and you should be able to run atom --safe.

kubetz avatar Jul 06 '15 00:07 kubetz

Go to C:\Users\AppData\Local\atom\app-1.0.0. There should be the executable and you should be able to run atom --safe.

Same in safe mode.

Whole word: atom

Without options: atom2

Sogl avatar Jul 06 '15 00:07 Sogl

Eh, now I realized that this is the wrong repo :blush:. Can you please reopen this issue in https://github.com/atom/find-and-replace before we continue?

EDIT: When you create the issue there, can you close this one? Also I am able to reproduce it, so I will look into it some more.

kubetz avatar Jul 06 '15 00:07 kubetz

Can you please reopen this issue in https://github.com/atom/find-and-replace before we continue?

Done.

p.s. I didn't think that the search and replace function in Atom has its own repository. So I created an issue here :relaxed:

Sogl avatar Jul 06 '15 01:07 Sogl

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

lock[bot] avatar Jan 21 '19 18:01 lock[bot]