Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for hyphenated properties on CSS #36

Open
vallovic opened this issue Feb 21, 2014 · 0 comments
Open

Workaround for hyphenated properties on CSS #36

vallovic opened this issue Feb 21, 2014 · 0 comments

Comments

@vallovic
Copy link

This is not really an issue, in fact it's just a recommendation on using this plugin in CSS, that I think that could be on the documentation.

When I want to check out the documentation of a given property/keyword/function using SublimePeek, I don't like to have to select it all. I have the cursor in there, I fire up Cmd+Shift-H. Simple.

By default, Sublime Text considers the hyphen as a word separator and I really like it that way, but because of that, when I try to use SublimePeek with a property like 'background-color', it shows me 'background' or 'color' documentation, depending on the location of the cursor (this is just an example).

As I said before, I like the hyphen as a word separator, but sometimes we have to give up something to make us more productive, so a workaround for this is to remove the hyphen from the word separators list, but only for CSS files.

To do this, open any CSS file you have (or set syntax to CSS on an empty one), then go to Preferences > Settings - More > Syntax Specific - User. It will open a CSS.sublime-settings file on which you should paste the following lines (it's just the default word separators list, without the hyphen):

{
    "word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?"
}

Save it and now you can fire up the documentation of any hyphenated CSS property just with the cursor in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant