gepoch / vim-surround

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

Leverage vim-mode's operation stack, text objects and composition abilities #14

Open lloeki opened 9 years ago

lloeki commented 9 years ago

vim-mode now publishes its editor state via a service. It may be fruitful to create an object representing the command and interact in a composable way with pushOperations. This will help make the surround adjective composable with many verbs and objects as well as be repeatable with ., recordable in macros...

gepoch commented 9 years ago

I actually saw your ticket in vim-mode that got it published as a service! I totally agree that that's definitely the way to go in the future, and that's been my intent for awhile.

Gearing up for the more advanced commands, we're probably due for a rethink about how we handle things going forwards :) This package is currently a bit hackish. Rewriting it to work with vim-mode APIs it absolutely key, I think.

Thanks for the info! I'll keep this ticket around for posterity.

irrationalistic commented 9 years ago

Not sure if this is relevant here, but one of the features I liked about vim-surround was the ability to use motions to assign surrounds instead of having to enter visual mode first! As in y s i w ) to surround the current word with parentheses.

gepoch commented 9 years ago

We definitely want to be at feature parity with vim-surround, but we'll need a bit of refactoring and specification before then.

We'll have to kick it down the road for now, but it's a definite goal!