Starting with:

let(:foo) { (bar + [baz]) }

ds( while on or within ( turns this into:

let(:foo) { bar + [baz] }

ds[ while on or within [ turns this into:

let(:foo) { bar + baz }

Get it here: tpope/vim-surround