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

Support hyphenated strings #19

Open
unphased opened this issue Apr 15, 2015 · 3 comments
Open

Support hyphenated strings #19

unphased opened this issue Apr 15, 2015 · 3 comments

Comments

@unphased
Copy link

What I am finding is that while CamelCaseMotion works great for camelCaseVariables and underscore_case_variables (though I have not tried it as much on those), it most certainly does not work for editing hypen-separated-variables which often are used with HTML/CSS classes and styles and so on.

Generally only an issue when the syntax is specified such that hyphens are not word separators. E.g. I have in after/ftplugin/javascript.vim: set iskeyword+=-

Also it is somewhat better because CamelCaseMotion (the way it works with underscores) even though it does not work with a modifier, will tend to grab the underscore, whereas without the iskeyword tweak the movement actions will never include a hyphen.

@imomaliev
Copy link

+1 for this feature

@bkad
Copy link
Owner

bkad commented Dec 6, 2016

Hmm, I work with hypen-separated-variables all the time in HTML/CSS files and haven't had an issue. I also just tried it with set iskeyword+=- and it seemed to work correctly. Try with the latest version and see if this is still an issue.

@unphased
Copy link
Author

unphased commented Dec 6, 2016

@bkad doesn't work for me.

To clarify i'm talking about:

([] represents cursor)

a-hyphenated-tok[e]n-in-code

type di,w (I'm using the comma binding scheme for this plugin), expect:

a-hyphenated-in-code

or

a-hyphenated--in-code

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

3 participants