vim-surround icon indicating copy to clipboard operation
vim-surround copied to clipboard

Support invoking from normal mode, e.g. `ys<text object><character>`

Open wmayner opened this issue 10 years ago • 2 comments

Thanks for bringing the incredible vim-surround to Atom!

The original supports surrounding a text object with the normal-mode command ys. From the README:

Now with the cursor on "Hello", press ysiw] (iw is a text object).

[Hello] world! This is how I usually use the plugin in Vim, rather than selecting with visual mode and then surrounding.

It would be awesome to be able to use it that way in Atom too. Of course, that would mean interacting with vim-mode's API to get a handle on an arbitrary text object; I don't know how easy that is given how it's currently implemented and how their API works.

wmayner avatar Aug 25 '15 00:08 wmayner

Yep, this is a huge issue facing vim-surround. It's pretty much an extended hack right now.

I have plans to get it rewritten as a proper member of the vim-mode universe, but I've been swamped at the day job! It's definitely in the road map.

PRs welcome ;)

gepoch avatar Aug 28 '15 17:08 gepoch

+1 hope ysiw" would work!

dragonxlwang avatar Mar 23 '16 04:03 dragonxlwang