gepoch / vim-surround

Surround for the Atom editor.
MIT License
52 stars 2 forks source link

Atom vim-surround uses different keybindings than classic vim-surround! #12

Closed ypresto closed 9 years ago

ypresto commented 9 years ago

Surrounding selected text with S key is useful feature of original surround.vim!

gepoch commented 9 years ago

Hey! Not sure what you mean exactly...? Is visual highlight + s " not surrounding text for you?

Is there a command using uppercase S that I'm not aware of?

ypresto commented 9 years ago

Oh, sorry I'm not aware of s keymap... I should say RTFM to me :P Original vim-surround's mapping for visual mode is S, not s.

https://github.com/tpope/vim-surround/blob/master/plugin/surround.vim#L586

  xmap S   <Plug>VSurround

But I think it's a great idea to use s mapping which has less key stroke than S!

gepoch commented 9 years ago

That's true!

The surround package probably does this to avoid shadowing the "substitute" command. However Atom can resolve ambiguous keybindings, so it takes a shortcut.

But this way of doing things certainly breaks backwards compatibility with peoples' muscle memory, which really isn't great...

Maybe we can make the dynamic keybindings configurable? Or include a tickbox for 'Legacy mode'

I definitely see the issue now :) I'll leave this ticket open as a place for discussion.

ypresto commented 9 years ago

I think it'll better to make it configurable if adding preferences. Something like this:

== Key Binding ==
● S
○ s
○ Other key: [____]
gepoch commented 9 years ago

Configurability added in 0.5.0!

ypresto commented 9 years ago

thanks!!!!!