-
Notifications
You must be signed in to change notification settings - Fork 391
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
Textobj for functions, including its args #2343
Comments
I'm glad to hear it! :)
What does this mean?
Sorry to be "daft", but can you be more precise about what you mean this text object should match and what it should not match? Also, what would the distinction between |
I mean so that I could place my cursor at any the indicated positions below, $\textnormal{function}(a, b) = g(a + b) / \myfun(a, b) * f[a, b]$
1 1 1 222. 3 3 444 and if I did normal-mode
I imagine it could build on vimtex's existing, extended delimiter support, but also include the Word in front. Now that I say that perhaps I should just make the mapping myself. Not sure what the distinction between |
Here's a first attempt.
The first Drawbacks:
|
I think this is partly related to #2025, which I'm sorry to say I have still not completed. I would propose that I focus on that one first, as it seems to be an integral part of the "equation" for going into this particular issue. However, I have to admit I'm not convinced that I should add the current suggestion as a text object. But if you think it is OK, then I propose that you follow the related #2025 (you can subscribe to notifications) and raise this suggestion again after I've finished implementing it. |
I was a bit hasty in proposing this (though I did search the issues for something similar). As much as I like #2025, I don't think this idea should build on it because this idea is all about using Right now I use this map
(the search is just for the previous whitespace or backslash, but involves some horrible escaping). |
I guess you could simplify this somewhat, e.g.
I didn't test this, but the idea is: first select current delimiter |
Thanks again for this wonderful plugin.
I'm not sure if it's easily doable, but it would be cool to have a
textobj
for functions, because I often find myself copy-pasting the arguments in a second step after dealing with the function (name) itself.MWE containing 4 different cases of functions.
The text was updated successfully, but these errors were encountered: