Open lloeki opened 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.
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.
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!
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 withpushOperations
. This will help make thesurround
adjective composable with many verbs and objects as well as be repeatable with.
, recordable in macros...