Replace

That's all. Now you already know enough about sandwich.vim. If you are using vim-surround, you can use a preset keymappings similar as it. See here

sandwich.vim has some functional input for {addition}/{deletion}. Check here!

Design

This plugin provides functions to add/delete/replace surroundings of a sandwiched text. These functions are implemented genuinely by utilizing operator/textobject framework. Thus their action can be repeated by . command without any dependency. It consists of two parts, operator-sandwich and textobj-sandwich.

operator-sandwich

A sandwiched text could be resolved into two parts, {surrounding} and {surrounded text}.

Configuration

The point is that it would be nice to be shared the definitions of {surrounding}s pairs in all kinds of operations. User can freely add new settings to extend the functionality. If g:sandwich#recipes was defined, this plugin works with the settings inside. As a first step, it would be better to copy the default settings in g:sandwich#default_recipes.

letg:sandwich#recipes =deepcopy(g:sandwich#default_recipes)

Each setting, it is called recipe, is a set of a definition of {surrounding}s pair and options. The key named buns is used for the definition of {surrounding}.