-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Improved count
support
#147
Comments
I've had the same feature request here: #86 There might be some relevant info there :) Btw, I still think this feature is useful (and there's no workaround for your usecase, e.g. ds2* doesn't work). |
@smjonas It seems like this is slightly different; your feature request was about surrounding larger selections (e.g. two words at a time), whereas this seems to be about surrounding a single word twice. @melkster This sounds like a good idea; unfortunately at the moment I need to first get through the other updates (good query support) and some other issues, and then learn how counting works. Apologies in advance if this takes a while, as I'll have less time to work on this during the school year/internship application season. |
Hello! It's been quite a while (sorry), but I'm productively procrastinating on my schoolwork by working on this plugin 😄 Coming back to this issue, it seems that we kind of have two different ways to approach this problem: prefixing the operator or prefixing the surround, i.e. My current thoughts are that the former has no real disadvantages (and can probably be implemented by leveraging the built-in
|
I just realized that there's already a bit of inconsistency with how things work for the Edit: The idea of parsing numbers after the motion is selected seems to make the most sense, e.g. |
Continuing the tradition of replying once a year (sorry!). It seems like I was mistaken before, and that prefixing the motion with a count already applies the count to the motion, i.e. |
I think I'll close this issue for now since implementing this seems to mandate some kind of breaking change, but if anybody has any new ideas that haven't already been posted in this thread, feel free to comment! Tangentially related is that with the |
I haven't solved the issue from a design standpoint (i.e. how to actually get the inputs in), but another person asked about this recently so I'm just saving this implementation snippet here for posterity:
I tested it out with passing in -- Before
hello world
-- After: 2ysiw)
((hello world))
|
I'm starting to get sold on the idea that |
I personally disagree. To me as a user it makes most sense if Moreover,
I do however understand if you decide to go with |
Thanks for weighing in! I think the prefix count and middle count get multiplied to form the motion, e.g. As for the suffix count, e.g.
|
Checklist
:h nvim-surround
to see if there might be any relevant information there?Is your feature request related to a problem? Please describe.
I think it would be really cool if I for instance could do something like
2siw*
to make a word bold in markdown (i.e. convertword
into**word**
), or do the opposite:2ds*
to make text non-bold in markdown (i.e. convert**word**
intoword
).Describe the solution you'd like
Prepending a count (i.e. a number 1-9) before a surround command performs the surround that many times over the same text-object.
The text was updated successfully, but these errors were encountered: