
# sane default for programming languages


_patterns = {}
_patterns['*'] =   r'(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)'
_patterns['php'] = r'(-?\d*\.\d\w*)|([^\-\`\~\!\@\#\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)'
_patterns['vim'] = r'(-?\d*\.\d\w*)|([^\-\`\~\!\@\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\'\"\,\.\<\>\/\?\s]+)'

def word_pattern(ctx):
    scope = ctx.get('scope',ctx.get('filetype','')).lower()
    return _patterns.get(scope, None) or _patterns['*']

@@ -152,32 +152,143 @@
 .%5C%3C%5C%3E%5C/%5C?%5Cs%5D+)'%0A
+_patterns%5B'css'%5D =   r'(-?%5Cd*%5C.%5Cd%5B%5Cw-%5D*)%7C(%5B%5E%5C%60%5C~%5C!%5C@%5C#%5C$%5C%25%5C%5E%5C&%5C*%5C(%5C)%5C=%5C+%5C%5B%5C%7B%5C%5D%5C%7D%5C%5C%5C%7C%5C;%5C:%5C'%5C%22%5C,%5C.%5C%3C%5C%3E%5C/%5C?%5Cs%5D+)'%0A
 _patterns%5B'php'%5D

Include css pattern