Replies: 1 comment 3 replies
-
|
For surround, it would be great to keep the pattern used with native operators, that is, The problem is, 100% consistency is only possible if we don't use After taking many factors into consideration, it seems we are left with two choices: No1 Cons:
Note: No2 Cons:
In the end, both are okay-ish. The choice is:
My main concern is the surround mnemonic. If only we could find an alternative one, like "embrace" ["b"], "box" ["x"], "wrap" ["w"]... but there's nothing for "z". |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Follow-up to the half-baked ideas in #41. I'm just dumping this here, trying to perform inception, so to say.
Q: "Why the fuss at all? Vim is about DIY, everyone can remap everything."
A: Having canonical mappings doesn't mean that everyone should use them. Still, good defaults are very important, especially for plugins like leap or vim-surround, that are kinda special: it's not just specific functionality they provide, for e.g. git stuff or code formatting. They aim to integrate into the very core of Vim as a text editor. Having conventions people - including other plugin authors - can rely on can be a feature too.
And, to be totally honest, because I think I echo many people's sentiments when I say that both should be included in the core eventually, even if that means years from now, even if the "motion" part just means the most bare-bones vanilla 2-char sneaking.
Personally I'd love to be able to break down the status quo with Leap, that is, handle the complete mess that resulted from:
s->S,S->gStransformation when switching from Normal to Visual?ysas the "basic" trigger?).s/S/v_s). Thus making 1. irrelevant, and - ironically - 2. itself pointless.With this out of the way:
Premises:
s/Sare rather useless shortcuts forclandccgsis needed by no one, there is even a discussion about removing it. IMO, it would make a lot of sense to establish it as a semi-official surround prefix, instead of repurposing it for something else.s/S, sorry.So here are finalists among the arrangements I came up with:
surround mappings in detail:
Alternatives for native keybindings that have been taken over:
s=clS=ccv_s=v_cv_S=Vcif not already in linewise mode (else =v_c)v_x=v_dv_X->vnoremap D X, and use$Dfor vanillav_b_Dbehav.gs-> not neededObservations:
gsrandgsdare in fact effortless to type;gsiwfeels even better thanysiw(y-iis a pretty uncomfortable stretch for the 1st and 2nd finger)! These are actually good sequences.Musings:
zSto something arbitrary but more comfortable anyway, or is it tolerable enough as a default?Beta Was this translation helpful? Give feedback.
All reactions