Closed Speculative closed 2 years ago
This is honestly something that's quite large from a coding perspective; I would recommend you take a look at something like targets.vim or the recently released mini.ai. The main problem with implementing this is that whenever you call ys[motion]
, there is no way for me to actually check what motion you entered, or modify it (see this upstream issue). The main reason I'm able to alias characters for delete/change operations is that whenever you call dsq
, nvim-surround actually calls ds'
, ds"
, and ds`
, then taking the "best" result. Something similar for normal-mode surrounds is impossible as of right now.
Makes sense, thanks for the suggestions :+1:
Checklist
:h nvim-surround
to see if there might be any relevant information there?Is your feature request related to a problem? Please describe. It doesn't seem currently possible to use tabular aliases as targets when adding surrounds.
Describe the solution you'd like If we have a surround that's targetable by a tabular alias
q
,"Some text"
Then in normal mode,ysaq)
should result in:("Some text")
Additional context Is it possible to do this on the user side? It seems unclear if adding new global motions is desirable as per #43. Per the docs for aliases:
Thanks for your work on this plugin!