-
Notifications
You must be signed in to change notification settings - Fork 131
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
Feature/configurable word separtor #113
base: master
Are you sure you want to change the base?
Feature/configurable word separtor #113
Conversation
Please don't worry about spam. Thank you for taking the time to create multiple patches for discussion. While looking at your previous patch, I noticed that And thinking about it, a single rune test is insufficient for more complex use cases. IIRC the original feature request wanted to configure CamelCase as separate words (and presumably ALLCAPS is a single word, not seven words). Maybe someone wants to treat . as a separator when it's part of a (As a minor style nit, _ in file names is used for magic build flags like _windows or _test. I'd be happier if we avoided underscores except when used for a magic build flag). |
b84b4fd
to
82b1ad2
Compare
Hm, I have not noticed the difference between ctrl-w and alt-f behavior in bash before. Yeah, "nextWorld", "deleteWord" and so on make sense. Should these functions do all the job or just return something like:
? I prefer the second variant, because these functions would be without side effects on the main state, so it would be easier to write them and test. |
Ok, I tried to group the word related functions into an interface and added an effect entity. It will allow to add some tests for these functions. I added the default implementation and the bash-like. What do you think? If this approach is ok, I'll cover these methods by tests and make rebase. // idk, maybe they should take a copy of the line. |
Hello again,
Sorry for the spam.
It's another variant of custom word separators. The previous pull request: #112
Here I tried to add "SetWhitespaceFunc" from an old proposal.