" surround.vim - Surroundings
" Maintainer: Tim Pope
" $Id: surround.vim,v 1.6 2006/10/30 01:34:06 tpope Exp $
" Help is below; it may be read here. Alternatively, after the plugin is
" installed and running, :call SurroundHelp() to install a proper help file.
" *surround.txt* Plugin for deleting, changing, and adding "surroundings"
"
" Author: Tim Pope *surround-author*
" License: Same terms as Vim itself (see |license|)
"
" This plugin is only available if 'compatible' is not set.
"
" Introduction: *surround*
"
" This plugin is a tool for dealing with pairs of "surroundings." Examples
" of surroundings include parentheses, quotes, and HTML tags. They are
" closely related to what Vim refers to as |text-objects|. Provided
" are mappings to allow for removing, changing, and adding surroundings.
"
" Details follow on the exact semantics, but first, consider the following
" examples. An asterisk (*) is used to denote the cursor position.
"
" Old text Command New text ~
" "Hello *world!" ds" Hello world!
" [123+4*56]/2 cs]) (123+456)/2
" "Look ma, I'm *HTML!" cs"Look ma, I'm HTML!
" if *x>3 { ysW( if ( x>3 ) {
" my $str = *whee!; vlllls' my $str = 'whee!';
"
" While a few features of this plugin will work in older versions of Vim,
" Vim 7 is recommended for full functionality.
"
" Mappings: *surround-mappings*
"
" Delete surroundings is *ds*. The next character given determines the target
" to delete. The exact nature of the target are explained in
" |surround-targets| but essentially it is the last character of a
" |text-object|. This mapping deletes the difference between the "inner"
" object and "an" object. This is easiest to understand with some examples:
"
" Old text Command New text ~
" "Hello *world!" ds" Hello world!
" (123+4*56)/2 ds) 123+456/2
"