/usr/share/doc/vim-scripts/html/plugin_surround.vim.html is in vim-scripts 20130814ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="Stylesheet" type="text/css" href="/css/style.css" >
<title>surround.vim - Delete/change/add parentheses/quotes/XML-tags/much more with ease : vim online</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="KEYWORDS" content="Vim, Vi IMproved, text editor, home, documentation, tips, scripts, news">
<link rel="shortcut icon" type="image/x-icon" href="/images/vim_shortcut.ico">
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff">
<!-- HEADER, SPONSOR IMAGE, VIM IMAGE AND BOOK AD -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
<tr>
<td colspan="4" class="lightbg"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
</tr>
<tr>
<td class="lightbg"> </td>
<td class="lightbg" align="left"><a href="/sponsor/index.php"><img src="/images/sponsorvim.gif" alt="sponsor Vim development" border="0"></a></td>
<td class="lightbg" align="center"><a href="/index.php"><img src="/images/vim_header.gif" border="0" alt="Vim logo"></a></td>
<td class="lightbg" align="right"><a href="http://iccf-holland.org/click5.html"><img src="/images/buyhelplearn.gif" alt="Vim Book Ad" border="0"></a></td>
</tr>
<tr>
<td colspan="4" class="lightbg"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
</tr>
<tr>
<td colspan="4" class="darkbg"><img src="/images/spacer.gif" width="1" height="10" alt=""></td>
</tr>
</table>
<!-- THE PAGE BODY: BETWEEN HEADER AND FOOTER -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<col width="180">
<col width="1">
<tr valign="top">
<td class="sidebar">
<table width="180" cellpadding="4" cellspacing="0" border="0">
<tr valign="top">
<td class="sidebar">
<!-- INCLUDE THE PAGE NAVIGATION -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
<tr>
<td><small>not logged in (<a href="/login.php">login</a>)</small></td>
</tr>
<tr><td>
<small> </small>
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-3005259998294962:bvyni59kjr1" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="20" />
<br>
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
</td></tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="1"></td>
</tr>
<tr>
<td class="darkbg"><img src="/images/spacer.gif" alt='' border="0" height="3"></td>
</tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="2"></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/index.php">Home</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/search.php">Advanced search</a></td>
</tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
</tr>
<tr>
<td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
</tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/about.php">About Vim</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/community.php">Community</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/news/news.php">News</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/sponsor/index.php">Sponsoring</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/trivia.php">Trivia</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/docs.php">Documentation</a></td>
</tr>
<tr>
<td class="sidebarheader download"><a href="/download.php">Download</a></td>
</tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
</tr>
<tr>
<td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
</tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/scripts/index.php">Scripts</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/tips/index.php">Tips</a></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/account/index.php">My Account</a></td>
</tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
</tr>
<tr>
<td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
</tr>
<tr>
<td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
</tr>
<tr>
<td class="sidebarheader"><a href="/huh.php">Site Help</a></td>
</tr>
</table>
<br>
<g:plusone></g:plusone>
<table width="172" cellpadding="0" cellspacing="0" border="0">
<tr><td><img src="/images/spacer.gif" alt="" border="0" width="1" height="8"></td></tr>
<tr><td class="darkbg"><img src="/images/spacer.gif" width="1" height="3" alt=""></td></tr>
</table>
<br>
<!-- INCLUDE THE PAGE SIDEBAR TEXT -->
</td>
</tr>
</table>
</td>
<td class="darkbg"><img src="/images/spacer.gif" width="1" height="1" border="0" alt=""><br></td>
<td>
<table width="100%" cellpadding="10" cellspacing="0" border="0" bordercolor="red">
<tr>
<td valign="top">
<span class="txth1">surround.vim : Delete/change/add parentheses/quotes/XML-tags/much more with ease</span>
<br>
<br>
<!-- karma table -->
<table cellpadding="4" cellspacing="0" border="1" bordercolor="#000066">
<tr>
<td class="lightbg"><b> script karma </b></td>
<td>
Rating <b>2158/653</b>,
Downloaded by 38153
<g:plusone></g:plusone>
</td>
<td class="lightbg">
<b> Comments, bugs, improvements </b>
</td>
<td>
<a href="http://vim.wikia.com/wiki/Script:1697">Vim wiki</a>
</td>
</tr>
</table>
<p>
<table cellspacing="0" cellpadding="0" border="0">
<tr><td class="prompt">created by</td></tr>
<tr><td><a href="/account/profile.php?user_id=9012">Tim Pope</a></td></tr>
<tr><td> </td></tr>
<tr><td class="prompt">script type</td></tr>
<tr><td>utility</td></tr>
<tr><td> </td></tr>
<tr><td class="prompt">description</td></tr>
<tr><td>Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML tags, and more. The plugin provides mappings to easily delete, change and add such surroundings in pairs. While it works under Vim 6, much of the functionality requires Vim 7.
<br>
<br>Examples follow. It is difficult to provide good examples in the variable width font of this site; check the documentation for more.
<br>
<br>Press cs"' (that's c, s, double quote, single quote) inside
<br>
<br>"Hello world!"
<br>
<br>to change it to
<br>
<br>'Hello world!'
<br>
<br>Now press cs' to change it to
<br>
<br>Hello world!
<br>
<br>To go full circle, press cst" to get
<br>
<br>"Hello world!"
<br>
<br>To remove the delimiters entirely, press ds" .
<br>
<br>Hello world!
<br>
<br>Now with the cursor on "Hello", press ysiw] (iw is a text object).
<br>
<br>[Hello] world!
<br>
<br>Let's make that braces and add some space (use "}" instead of "{" for no space): cs]{
<br>
<br>{ Hello } world!
<br>
<br>Now wrap the entire line in parentheses with yssb or yss) .
<br>
<br>({ Hello } world!)
<br>
<br>Revert to the original text: ds{ds)
<br>
<br>Hello world!
<br>
<br>Emphasize hello: ysiw
<br>
<br>Hello world!
<br>
<br>Finally, let's try out visual mode. Press a capital V (for linewise visual mode)
<br>followed by S.
<br>
<br>
<br> Hello world!
<br>
<br>
<br>This plugin is very powerful for HTML and XML editing, a niche which currently seems underfilled in Vim land. (As opposed to HTML/XML *inserting*, for which many plugins are available). Adding, changing, and removing pairs of tags simultaneously is a breeze.
<br>
<br>The "." command will work with ds, cs, and yss if you install repeat.vim, <a href="/scripts/script.php?script_id=2136">vimscript #2136</a>.
<br>
<br>All feedback appreciated.
<br>
<br><a target="_blank" href="http://github.com/tpope/vim-surround">http://github.com/tpope/vim-surround</A></td></tr>
<tr><td> </td></tr>
<tr><td class="prompt">install details</td></tr>
<tr><td>Extract to ~/.vim, or ~\vimfiles (Windows). You'll need to regenerate helptags (fill in the install path below)
<br>
<br>:helptags ~/.vim/doc</td></tr>
<tr><td> </td></tr>
</table>
<span class="txth2">script versions</span> (<a href="add_script_version.php?script_id=1697">upload new version</a>)
<p>
Click on the package to download.
<p>
<table cellspacing="2" cellpadding="4" border="0" width="100%">
<tr class='tableheader'>
<th valign="top">package</th>
<th valign="top">script version</th>
<th valign="top">date</th>
<th valign="top">Vim version</th>
<th valign="top">user</th>
<th valign="top">release notes</th>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=19287">surround.zip</a></td>
<td class="rowodd" valign="top" nowrap><b>2.0</b></td>
<td class="rowodd" valign="top" nowrap><i>2013-01-01</i></td>
<td class="rowodd" valign="top" nowrap>7.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">Fix vs with selection=exclusive.
<br>Remove `unnamedplus' from clipboard in addition to `unnamed'.
<br>Kill vs.
<br>Bump to Vim 7.
<br>Add support for repeating ys commands.
<br>Add support for repeating tags.
<br>Don't save deleted surrounding in unnamed register.
<br>Fix deletion of delimiters on their own lines.</td>
</tr>
<tr>
<td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=12566">surround.zip</a></td>
<td class="roweven" valign="top" nowrap><b>1.90</b></td>
<td class="roweven" valign="top" nowrap><i>2010-03-06</i></td>
<td class="roweven" valign="top" nowrap>6.0</td>
<td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="roweven" valign="top" width="2000">Completely eliminate wonky % mapping in prompts.
<br>Workaround for user remapped d. [Christian Oudard]
<br>Introduce vgS and begin phasing out vs.</td>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=8283">surround.zip</a></td>
<td class="rowodd" valign="top" nowrap><b>1.34</b></td>
<td class="rowodd" valign="top" nowrap><i>2008-02-15</i></td>
<td class="rowodd" valign="top" nowrap>6.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">One more regression fix.
<br>This is really really planned as the last release with partial Vim 6.0 compatibility (third time's the charm).</td>
</tr>
<tr>
<td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=8229">surround.zip</a></td>
<td class="roweven" valign="top" nowrap><b>1.33</b></td>
<td class="roweven" valign="top" nowrap><i>2008-02-03</i></td>
<td class="roweven" valign="top" nowrap>7.0</td>
<td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="roweven" valign="top" width="2000">Fixed regressions from previous release.
<br>This is really planned as the last release with partial Vim 6.0 compatibility.</td>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=8185">surround.zip</a></td>
<td class="rowodd" valign="top" nowrap><b>1.30</b></td>
<td class="rowodd" valign="top" nowrap><i>2008-01-27</i></td>
<td class="rowodd" valign="top" nowrap>7.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">Fixed edge case where ds could move a multiline inner text down one line.
<br>This is planned as the last release with partial Vim 6.0 compatibility.</td>
</tr>
<tr>
<td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=7744">surround.zip</a></td>
<td class="roweven" valign="top" nowrap><b>1.27</b></td>
<td class="roweven" valign="top" nowrap><i>2007-10-03</i></td>
<td class="roweven" valign="top" nowrap>7.0</td>
<td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="roweven" valign="top" width="2000">Fixed multiline surrounds in insert mode
<br></td>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=7434">surround.vim</a></td>
<td class="rowodd" valign="top" nowrap><b>1.26</b></td>
<td class="rowodd" valign="top" nowrap><i>2007-07-31</i></td>
<td class="rowodd" valign="top" nowrap>7.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">Added a /* C style comment */ target.
<br>Insert mode indenting limited to multiline insertions.</td>
</tr>
<tr>
<td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=7093">surround.zip</a></td>
<td class="roweven" valign="top" nowrap><b>1.24</b></td>
<td class="roweven" valign="top" nowrap><i>2007-05-10</i></td>
<td class="roweven" valign="top" nowrap>7.0</td>
<td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="roweven" valign="top" width="2000">surround_indent now works in insert mode.
<br>Added <C-]> to add braces on separate lines.</td>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=6747">surround.zip</a></td>
<td class="rowodd" valign="top" nowrap><b>1.23</b></td>
<td class="rowodd" valign="top" nowrap><i>2007-02-16</i></td>
<td class="rowodd" valign="top" nowrap>7.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">xmap rather than vmap, to avoid interfering with select mode.
<br>surround_insert_tail to specify a universal suffix for use in insert mode.</td>
</tr>
<tr>
<td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=6737">surround.zip</a></td>
<td class="roweven" valign="top" nowrap><b>1.22</b></td>
<td class="roweven" valign="top" nowrap><i>2007-02-11</i></td>
<td class="roweven" valign="top" nowrap>7.0</td>
<td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="roweven" valign="top" width="2000">Function properly when clipboard=unnamed
<br>Very experimental custom prompting for substitution text</td>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=6411">surround.zip</a></td>
<td class="rowodd" valign="top" nowrap><b>1.18</b></td>
<td class="rowodd" valign="top" nowrap><i>2006-11-13</i></td>
<td class="rowodd" valign="top" nowrap>7.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">Zip file instead of documentation extraction hack</td>
</tr>
<tr>
<td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=6399">surround.vim</a></td>
<td class="roweven" valign="top" nowrap><b>1.17</b></td>
<td class="roweven" valign="top" nowrap><i>2006-11-09</i></td>
<td class="roweven" valign="top" nowrap>6.0</td>
<td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="roweven" valign="top" width="2000">Insert mode mapping that doesn't conflict with flow control.
<br>Fixed edge case with ys where one too many characters would be grabbed.</td>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=6379">surround.vim</a></td>
<td class="rowodd" valign="top" nowrap><b>1.16</b></td>
<td class="rowodd" valign="top" nowrap><i>2006-11-05</i></td>
<td class="rowodd" valign="top" nowrap>7.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">S in blockwise visual mode strips trailing whitespace.</td>
</tr>
<tr>
<td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=6357">surround.vim</a></td>
<td class="roweven" valign="top" nowrap><b>1.12</b></td>
<td class="roweven" valign="top" nowrap><i>2006-10-31</i></td>
<td class="roweven" valign="top" nowrap>7.0</td>
<td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="roweven" valign="top" width="2000">Lots of tiny bug fixes and cleanup.
<br>"S" mappings to force surroundings onto a separate line.
<br>Support for blockwise visual mode.</td>
</tr>
<tr>
<td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=6348">surround.vim</a></td>
<td class="rowodd" valign="top" nowrap><b>1.6</b></td>
<td class="rowodd" valign="top" nowrap><i>2006-10-29</i></td>
<td class="rowodd" valign="top" nowrap>7.0</td>
<td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=9012">Tim Pope</a></i></td>
<td class="rowodd" valign="top" width="2000">Initial upload</td>
</tr>
</table>
<!-- finish off the framework -->
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- END OF THE PAGE BODY: BETWEEN HEADER AND FOOTER -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
<tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr>
<tr><td colspan="4" bgcolor="#000000"><img src="/images/spacer.gif" height="2" width="1" alt=""></td></tr>
<tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr>
<tr>
<td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>
<td align="left" valign="top"><small>
If you have questions or remarks about this site, visit the
<a href="http://vimonline.sf.net">vimonline development</a> pages.
Please use this site responsibly.
<br>
Questions about <a href="http://www.vim.org/about.php">Vim</a> should go
to the <a href="http://www.vim.org/maillist.php">maillist</a>.
Help Bram <a href="http://iccf-holland.org/">help Uganda</a>.
</small>
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1417324;
var sc_invisible=1;
var sc_partition=11;
var sc_security="d41633bc";
</script>
<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c12.statcounter.com/counter.php?sc_project=1417324&java=0&security=d41633bc&invisible=0" alt="free tracking" border="0"></a> </noscript>
<!-- End of StatCounter Code -->
</td>
<td align="right" valign="top">
<a href="http://sourceforge.net/projects/vim" rel="nofollow"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
</td>
<td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>
</tr>
<tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
</tr>
</table>
<!-- for Google +1 button -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</body>
</html>
|