Replies: 1 comment 2 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.
-
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
->gS
transformation when switching from Normal to Visual?ys
as the "basic" trigger?).s
/S
/v_s
). Thus making 1. irrelevant, and - ironically - 2. itself pointless.With this out of the way:
Premises:
s/S
are rather useless shortcuts forcl
andcc
gs
is 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
=cl
S
=cc
v_s
=v_c
v_S
=Vc
if not already in linewise mode (else =v_c
)v_x
=v_d
v_X
->vnoremap D X
, and use$D
for vanillav_b_D
behav.gs
-> not neededObservations:
gsr
andgsd
are in fact effortless to type;gsiw
feels even better thanysiw
(y
-i
is a pretty uncomfortable stretch for the 1st and 2nd finger)! These are actually good sequences.Musings:
zS
to something arbitrary but more comfortable anyway, or is it tolerable enough as a default?Beta Was this translation helpful? Give feedback.
All reactions