Closed aurovrata closed 4 years ago
What constitutes a "whole word" is defined by the language, in this case the PHP language doesn't consider the $
as part of the "word characters", thus you can't use whole word to search for that.
hahaha, that's a rather lame reply. Are you just too busy to fix this or are you genuinely being lame?
If one cannot search and replace variables in a PHP code then what's the purpose of the functionality in the first place?
This issue was reported almost 6 years ago but I think the Atom maintainers are struggling to put out these fires. Here is the technique I'm using until they get around to it: https://github.com/atom/find-and-replace/issues/1121
Enable the .* regex option. Disable the whole word option.
\$variable\b
Basically surround the search in \
and add b
on the end. It works well enough I guess.
Unfortunately @Arcanemagus dismissed this as a non-issue and closed it. So it will never get fixed. Time to look for another IDE?
the search is able to find variables start with the word, for example searching for
$valid
will find$valid
$validation
(highlights only$valid
part of the word)$validted
(highlights only `$valid part of the word)however, when toggling the 'whole word` option, it finds no match.
I have to use the 'regex' mode and search for '\$valid ' with a space after it.