oni icon indicating copy to clipboard operation
oni copied to clipboard

Default behavior of Y

Open sweenu opened this issue 8 years ago • 9 comments

This is a little opiniated but I think it would be good to remap Y to go to the end of line by default (in line with C and D).

This default behaviour has already been adopted by distros like SpaceVim and I think is especially better for those new to Vim and that expect a similar behavior as C and D.

Let me know what you think!

sweenu avatar Apr 01 '18 11:04 sweenu

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Apr 01 '18 11:04 oni-bot

Doing that for V makes no sense, the default behavior of V is important.

Spacevim is serving the "distro" audience. It shouldn't be used to decide defaults for a wider audience, unless being a distro is the goal.

justinmk avatar Apr 01 '18 12:04 justinmk

I'm so stupid, of course V shouldn't change, I don't know what I was thinking...

I feel like there was two keys affected by this but it was definitely not V, sorry.

I'm going to edit the issue to make more sense.

sweenu avatar Apr 01 '18 14:04 sweenu

@Sweenu thanks for raising this for discussion 👍 .

imo I think the more opinionated oni is the more likely it is to alienate long-term vim users. That being said I think this remapping is popular (and I have remapped it in my own config)

Whilst it might have some advantages for a new user, tbh if people are going to learn to use vim by way of oni then I think having them get used to oni bindings only to discover they don't reflect how vim natively works could lead to confusion.

akinsho avatar Apr 01 '18 14:04 akinsho

I don't get it, what remapping are you talking about? (seems I don't have it)

bew avatar Apr 01 '18 19:04 bew

@bew I meant that remapping the Y to y$ seems to be popular I think and I've done the same. It's not a mapping we have in oni.

akinsho avatar Apr 01 '18 19:04 akinsho

Oh I don't have that, and I use a lot Y to copy the entire line without having to think about where the cursor is in that line.. (This is the default behavior of Y)

If you start adding opinionated mappings, it shouldn't be the default, if you really want to do it maybe you could add an "easy mode" to oni with them, but they definitely shouldn't be the default..

But imo, a new user shouldn't learn the "wrong" mapping, you could suggest changes to their config (e.g: end of tutorial?) but please don't force default mappings.

Like @justinmk said, this may be the role of a distro, and if you do that, you change your targeted user.

bew avatar Apr 01 '18 19:04 bew

Get it! I understand it wouldn't be appropriate for Oni to do that. I think I'd be nice then to at least have an easy way to do such remaping. Maybe I just missed it?

sweenu avatar Apr 03 '18 06:04 sweenu

I've put https://github.com/onivim/oni/issues/2022 to enable a minimal distro, so the improvements to enable it should be the same for a different opinionated distro (in particular, loading a base configuration file).

badosu avatar Apr 03 '18 12:04 badosu