Skip to content

Instantly share code, notes, and snippets.

@deweller
Created July 18, 2013 15:07
Show Gist options
  • Save deweller/6030087 to your computer and use it in GitHub Desktop.
Save deweller/6030087 to your computer and use it in GitHub Desktop.
Allows Sublime Text to treat variables that start with $ as words. This file should named PHP.sublime-settings and should be located in your Packages/User directory next to your user preferences file.
// this file should named PHP.sublime-settings
// and should be located in your Packages/User directory (next to your user preferences file)
{
// Characters that are considered to separate words
// this is modified from the default with the $ removed
// this allows PHP variables to be treated as words
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}
@const-g
Copy link

const-g commented Jul 22, 2013

Hi and thank you to share this.

I found one problem that makes me not use it : When all is selected, Sublime does not highlight other variable occurrence in the code.

Any idea how to fix that ?

@mifas
Copy link

mifas commented Jul 26, 2013

@Cog-g install WordHighlight plugin. https://github.com/SublimeText/WordHighlight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment