Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I removed the dollar sign from the list of word separators to be able to select PHP variables with double-clicks. Problem is when i select a variable: what i would expect is all other occurrences of the variable to be highlighted but it doesn't happen. Any idea?

share|improve this question
    
Does it work in Sublime Text 2? The reason I ask is to see if it is a problem with the pre-release/beta software (off topic on SU) or is a Sublime Text * issue (on topic on SU). –  nerdwaller Sep 18 '13 at 16:38
    
I just tried it on SB2 and it doesn't work. Should i remove the version from this answer? –  Ithilion Sep 18 '13 at 16:43

1 Answer 1

up vote 0 down vote accepted

It's working just fine for me in ST2 on XP. What may have happened is your "match_selection" setting might have gotten set to false. Make sure

"match_selection": true

is in your preferences file (Preferences -> Settings - User) and you should see the expected behavior.


UPDATE After checking some other ST3 builds on a different machine, I was able to replicate the issue, however it doesn't seem to depend on whether $ is included in the "word_separators" preference. Using the following test code:

<?php

function myFunc($var_1, $var_2) {
    return $var_1 + $var_2;
}

I selected var_1 in one line, and the corresponding var_1 was highlighted with a box around it, like usual. Same with var_2. Next, I selected $var_1, but the other occurrence was not highlighted. This behavior was the same regardless of whether $ is defined as a word separator or not. Interestingly, even though the other $var_1 wasn't highlighted, it was still able to be selected with CtrlD, so the bug is only with the highlighting code, not the search and select code.

https://github.com/SublimeText/Issues/issues is the unofficial repository for Sublime Text issues, mainly those having to do with ST3. I'd suggest you head over there, search around to see if anyone else has noticed this, and if not to open a new issue with as much detail as possible.

share|improve this answer
    
what versions/build numbers are you using? And what platform are you on? –  MattDMo Sep 18 '13 at 17:50
    
I'm using ST3 build 3047 on Windows 7 Ultimate x64 (ST3 is portable edition) –  Ithilion Sep 18 '13 at 17:52
    
If you're a registered user, try Build 3053. Maybe something got broken somewhere... –  MattDMo Sep 18 '13 at 17:55
    
I just logged into another machine running Build 3048 and I see the same thing - if I select just the text part of the variable, I see the corresponding part highlight elsewhere. However, if I include the $, no highlighting. I'd suggest heading over to the unofficial ST3 issues tracker on GitHub, search around, then open an issue if no one has reported it yet. –  MattDMo Sep 18 '13 at 18:02
    
Unfortunately, i'm not (yet) a registered user. I'll try reporting it as you suggested. –  Ithilion Sep 18 '13 at 18:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.