Closed daanturo closed 2 years ago
While I also usually just slurp, barf one sexp at a time, prefix arg works quite well in tandem with relative line number mode when we have written a long list:
64 (do |)
1 (something-a)
2 (something-b)
3 (something-c)
4 (something-d)
5 (something-e)
6 (something-f)
7 (something-g)
8 (something-h)
9 (something-i)
Then decide to wrap the list by slurping. Or do the opposite: release them from the current sexp by barfing.
64 (do |
1 (something-a)
2 (something-b)
3 (something-c))
In those cases, having prefix numeric arguments is really helpful
(Also after using evil
for some time, the others users (I think) and I find the concept of numeric prefix quite ingrained.)
Further discussion: if prefix numbers get accepted, how should we act when they are negative?
Forparedit
the opposite of forward-slurp
is forward-barf
, while for smartparens
it's backward-slurp
, both are reasonable at the same time a bit confusing.
IMO we ought to just no-op when a negative argument is passed, that will greatly simplify the added code.
Ah, that makes much sense. I don't use line number (or evil) so I didn't realize it's convenient.
if prefix numbers get accepted, how should we act when they are negative...
I'd say you can do whichever you like, or just leave it until some user tell us about their preference.
Thanks!
Thanks. However, I don't quite understand the necessity of numeric argument.
For slurp/barf, I think we usually
Is it really common that we know the number of sexps to slurp/barf beforehand?