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 CamelCaseMotion, integrate nvim-spider #2

Open
NormTurtle opened this issue Aug 13, 2023 · 11 comments
Open

Support CamelCaseMotion, integrate nvim-spider #2

NormTurtle opened this issue Aug 13, 2023 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@NormTurtle
Copy link

Default behavior of NODES("{[ < is good, but i MOSTY do WORD selection which is not seem to happening

example of wats wrong

outpt.mp4

just give me a way to do so :)

@NormTurtle NormTurtle changed the title **CamelCaseMotion** Support integrate nvim-spider Support CamelCaseMotion, integrate nvim-spider Aug 13, 2023
@fecet
Copy link
Member

fecet commented Aug 14, 2023

Did you mean select the word CamelCaseMotion in the comments?

@fecet fecet mentioned this issue Aug 15, 2023
@fecet fecet self-assigned this Aug 15, 2023
@fecet fecet added the enhancement New feature or request label Aug 15, 2023
@NormTurtle
Copy link
Author

yes , word Based selection but Based on CamelCaseMotion such in that way it would require x3 to select CamelCaseMotion whole !

@fecet
Copy link
Member

fecet commented Aug 16, 2023

I think this might be harder to achieve than it looks. Have you seen any plugins do similar things so I can look into it?

@NormTurtle
Copy link
Author

sorry i think i forgot to inform about nvim-spider in above convo's :(

NVIM-Spider has done it already for motion, you just use it with visual-motion
this may make this work easy,

@fecet
Copy link
Member

fecet commented Aug 18, 2023

OK I will take care of it, maybe add this with custom textobjects.
This would introduce inconsistent incremental selection methods (searching for the parent node and searching for the next subword), so I'm still considering how to implement them.

@NormTurtle
Copy link
Author

sorry but i dont' know what to say now ?! :|

@fecet
Copy link
Member

fecet commented Aug 19, 2023

I have played with NVIM-Spider for a while, but I cannot make it work in visual mode. If you have slected CamelCase in CamelCaseMotion, can you select CamelCaseMotion by w and Camel by b?

@chrisgrieser
Copy link

@fecet Hi, nvim-spider dev here.

At least for stuff relating to my plugin, I can maybe help out.

@fecet
Copy link
Member

fecet commented Aug 21, 2023

@chrisgrieser Hi, thanks for response, I hadn't expect this.

I don't think there is any bug here, (neither for nvim-spider of course). I just wondering if/how spider works in visual mode, say, in the case

If you have slected CamelCase in CamelCaseMotion, can you select CamelCaseMotion by w and Camel by b?

This is what I had envisioned, but things didn't unfold this way. I'm wondering if it's due to an issue with my setup or if the spider doesn't actually work like this.

I had never used spider before this, but I loved nvim-origami very much, thank you for making so many great plugins!

@chrisgrieser
Copy link

If you have slectedCamelCase inCamelCaseMotion, can you selectCamelCaseMotion by w andCamel by b?

Indeed, it appears in this case b selected CamelC 🤔

I don't use visual mode much, therefore I haven't noticed. But that only happens when using b to reduce a selection, when using b to enlarge a selection, it works correctly. Guess that one is a bug with nvim-spider indeed.

@fecet
Copy link
Member

fecet commented Aug 23, 2023

So, I believe the right approach would be to init wildfire with the subword , then you can employ spider to refine your selection range.

I will proceed with implementing the former, but the latter will have to wait for spider.

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

No branches or pull requests

3 participants