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

A way to override Vim's W, B, E commands #24

Closed
proxict opened this issue Aug 27, 2019 · 3 comments
Closed

A way to override Vim's W, B, E commands #24

proxict opened this issue Aug 27, 2019 · 3 comments
Assignees

Comments

@proxict
Copy link

proxict commented Aug 27, 2019

First of all, massive thanks for this plugin. I have been using this plugin for years and I've always taken it for granted, being very surprised when I suddenly had to work in Vim without this plugin.

I've always wished for one more feature of this plugin and that would be the possibility to also override the default Vim's W, B, E, and possibly other commands.
The default behaviour is that Vim stops on the space character on these W, B, E commands. It would be great, in my opinion, if we could also override this behaviour so that Vim would stop on characters like -.,> but not on CamelCase snake_case and so on.

To give an example:

|CamelCaseWord->followed_by_snake_case

With the current behaviour, when I press W, the cursor moves the the end of the line.
What I would like is the cursor stopping on the dash character:

CamelCaseWord|->followed_by_snake_case

This would allow me to delete the first CamelCaseWord, for example, without deleting the rest. Now I have to press 3dw or 3 times dw.

Hopefully it makes sense what I mean.

@chaoren chaoren self-assigned this Aug 28, 2019
chaoren added a commit that referenced this issue May 25, 2020
Same as regular `W`, `B`, `E`, `gE`, except it also respects
`g:wordmotion_spaces`.
chaoren added a commit that referenced this issue May 25, 2020
Same as regular `W`, `B`, `E`, `gE`, except it also respects
`g:wordmotion_spaces`.
chaoren added a commit that referenced this issue May 25, 2020
Same as regular `W`, `B`, `E`, `gE`, except it also respects
`g:wordmotion_spaces`.
chaoren added a commit that referenced this issue May 25, 2020
Same as regular `W`, `B`, `E`, `gE`, except it also respects
`g:wordmotion_spaces`.
chaoren added a commit that referenced this issue May 25, 2020
Same as regular `W`, `B`, `E`, `gE`, except it also respects
`g:wordmotion_spaces`.
@proxict
Copy link
Author

proxict commented May 27, 2020

@chaoren Thanks a lot for the feature, really appreciate it! 🎉

@chaoren
Copy link
Owner

chaoren commented May 27, 2020

Haha, no problem. Sorry for taking a whole year to do it.

@proxict
Copy link
Author

proxict commented May 27, 2020

@chaoren No need to apologize, I totally understand that you're doing this in your free time ;) Had I spent the year learning vimscript, maybe I would have gained the knowledge required to help out ;)

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

2 participants