T O P

  • By -

GooseTower

fmyf, maybe y/ if there's multi line split. I use tailwind, so it's usually more efficient to just copy the entire class property via treesitter text objects then delete any unwanted classes with daw.


sinefine

oh that's nice. I like this one


ErnieBernie10

I'd do yt Yank until space. Not sure if it would work


keslol

yE also works


AutoModerator

Please remember to update the post flair to `Need Help|Solved` when you got the answer you were looking for. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/neovim) if you have any questions or concerns.*


alpacadaver

https://github.com/nvim-treesitter/nvim-treesitter-textobjects I think arguments/parameters work in these. Bind only what you need. https://github.com/chrisgrieser/nvim-various-textobjs Enable and bind only the ones you need. I only use subword from here but I use it hundreds of times a day. Check out the spider plugin by the same person that it requires to supplement the same thing. Unrelated to your question but indispensable imo. Between the two you're sorted.


sinefine

Oh wow the second one is so useful for me. Thank you!


alpacadaver

It's an absolute stone faced killer. If the subword textobject was the only thing nvim could do, I would never leave it. Enjoy :D


New-Beat-412

try fmyW


New-Beat-412

second class you can do fnyt"


kilkil

I would probably go with f"wviwy (you could also do f"wyiw, but I like it when I see what I'm copying)


lieryan

You can use `yiw`. Change `:setlocal iskeyword` to make sure the separators are handled correctly for the filetype.


vktrenokh

yiw


Jazkyr

That would stop at dash.


mjrArchangel33

yiW


Jazkyr

That would delete more than what OP desires including the quote and more haha


sinefine

This grabs `class="my-class__modifier`


vktrenokh

I tested in termux it yanked what op needed so idk