Home Download Buy Blog Forum Support

Highlight other occurences selected word - bug in PHP

Highlight other occurences selected word - bug in PHP

Postby dhorse on Thu Mar 01, 2012 1:46 pm

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.
dhorse
 
Posts: 10
Joined: Fri Jan 13, 2012 7:04 pm

Re: Highlight other occurences selected word - bug in PHP

Postby sheldno on Thu Mar 01, 2012 3:19 pm

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.

Code: Select all
@item
@item

Ubuntu, build 2180
sheldno
 
Posts: 22
Joined: Thu Oct 06, 2011 4:09 pm

Re: Highlight other occurences selected word - bug in PHP

Postby dhorse on Thu Mar 01, 2012 3:32 pm

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?
dhorse
 
Posts: 10
Joined: Fri Jan 13, 2012 7:04 pm

Re: Highlight other occurences selected word - bug in PHP

Postby defiant on Thu Mar 01, 2012 9:09 pm

I too have this issue in PHP.

sheldno wrote: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.

Code: Select all
@item
@item


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 :D
defiant
 
Posts: 4
Joined: Thu Mar 01, 2012 8:59 pm

Re: Highlight other occurences selected word - bug in PHP

Postby dhorse on Mon Mar 05, 2012 10:32 am

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.
dhorse
 
Posts: 10
Joined: Fri Jan 13, 2012 7:04 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 17 guests