Sublime Forum

Highlight other occurences selected word - bug in PHP

#1

I’m happy that in the new build, other occurences of selected word is highlighted. However, it doesn’t work with PHP variables, i.e: $variable
Do you have a solution for this?

Thank you in advance.

0 Likes

#2

I have a similar issue with Rails, I’ve removed “@” from “word_separators” so that ST2 treats instance variables as one word.

In the following example, if I move the cursor onto the first occurrence of “@item” and then press ctrl+d ST2 will select the first occurrence of “@item” and not highlight the second. If I press ctrl+d a second time nothing will happen, I would expect it to select the second occurrence of “@item” in addition to the first.

@item
@item

Ubuntu, build 2180

0 Likes

#3

I have also removed $ from word separators, and it worked well on the previous version with a 3rd party word highlight plugin. If course I’d like to use the built in, if it’s possible, but yet it’s not working well for PHP and as we see neither for Ruby. Dear authors, do you have a solution?

0 Likes

#4

I too have this issue in PHP.

[quote=“sheldno”]In the following example, if I move the cursor onto the first occurrence of “@item” and then press ctrl+d ST2 will select the first occurrence of “@item” and not highlight the second. If I press ctrl+d a second time nothing will happen, I would expect it to select the second occurrence of “@item” in addition to the first.

@item @item[/quote]

Same again, but I found if I select the first occurrence first, then press Ctrl+D it works as expected.

Thanks for a great editor! I’m quite new to it, but am loving every minute :smiley:

0 Likes

#5

I used OSX, Ctrl+D and Cmd+D both does some totally different thing. Anyway, I ended up disabling the built-in highlight feature, and installing WordHighlight package. Now it works.

0 Likes