r1191 - in /trunk/packages/vim-scripts: debian/changelog debian/vim-registry/vim-scripts.yaml debian/vim-scripts.status doc/surround.txt html/index.html html/plugin_surround.vim.html plugin/surround.vim

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Tue Feb 5 21:44:23 UTC 2008


Author: jamessan
Date: Tue Feb  5 21:44:23 2008
New Revision: 1191

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1191
Log:
* Updated addons:
  - surround
  - vcscommand: Add support for git

Modified:
    trunk/packages/vim-scripts/debian/changelog
    trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml
    trunk/packages/vim-scripts/debian/vim-scripts.status
    trunk/packages/vim-scripts/doc/surround.txt
    trunk/packages/vim-scripts/html/index.html
    trunk/packages/vim-scripts/html/plugin_surround.vim.html
    trunk/packages/vim-scripts/plugin/surround.vim

Modified: trunk/packages/vim-scripts/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/changelog?rev=1191&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/changelog (original)
+++ trunk/packages/vim-scripts/debian/changelog Tue Feb  5 21:44:23 2008
@@ -1,6 +1,9 @@
 vim-scripts (7.1.6) UNRELEASED; urgency=low
 
   * Actually install indent/python.vim.  (Closes: #464088)
+  * Updated addons:
+    - surround
+    - vcscommand: Add support for git
 
  -- James Vega <jamessan at debian.org>  Fri, 25 Jan 2008 02:11:59 -0500
 

Modified: trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml?rev=1191&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml (original)
+++ trunk/packages/vim-scripts/debian/vim-registry/vim-scripts.yaml Tue Feb  5 21:44:23 2008
@@ -86,6 +86,7 @@
   - plugin/vcscommand.vim
   - doc/vcscommand.txt
   - plugin/vcscvs.vim
+  - plugin/vcsgit.vim
   - plugin/vcssvn.vim
   - plugin/vcssvk.vim
   - syntax/CVSAnnotate.vim

Modified: trunk/packages/vim-scripts/debian/vim-scripts.status
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/vim-scripts.status?rev=1191&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/vim-scripts.status (original)
+++ trunk/packages/vim-scripts/debian/vim-scripts.status Tue Feb  5 21:44:23 2008
@@ -137,9 +137,9 @@
 author_url:  http://www.vim.org/account/profile.php?user_id=241
 email:       bob.hiestand at gmail.com
 license:     public domain
-extras:	     doc/vcscommand.txt, plugin/vcscvs.vim, plugin/vcssvn.vim, plugin/vcssvk.vim, syntax/CVSAnnotate.vim, syntax/SVNAnnotate.vim, syntax/SVKAnnotate.vim, syntax/vcscommit.vim
+extras:	     doc/vcscommand.txt, plugin/vcscvs.vim, plugin/vcsgit.vim, plugin/vcssvn.vim, plugin/vcssvk.vim, syntax/CVSAnnotate.vim, syntax/SVNAnnotate.vim, syntax/SVKAnnotate.vim, syntax/vcscommit.vim
 disabledby:  let loaded_VCSCommand = 1
-version:     beta19
+version:     beta20
 
 script_name: plugin/utl.vim
 addon:       utl
@@ -377,7 +377,7 @@
 license:     Vim's license [4], see below
 extras:      doc/surround.txt
 disabledby:  let loaded_surround = 1
-version:     1.27
+version:     1.33
 
 script_name: syntax/mkd.vim
 addon:       markdown-syntax

Modified: trunk/packages/vim-scripts/doc/surround.txt
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/doc/surround.txt?rev=1191&op=diff
==============================================================================
--- trunk/packages/vim-scripts/doc/surround.txt (original)
+++ trunk/packages/vim-scripts/doc/surround.txt Tue Feb  5 21:44:23 2008
@@ -170,9 +170,9 @@
 <
 Advanced, experimental, and subject to change:  One can also prompt for
 replacement text.  The syntax for this is to surround the replacement in pairs
-of low numbered controller characters.  If this sounds confusing, that's
-because it is (but it makes the parsing easy).  Consider the following example
-for a LaTeX environment on the "l" replacement.
+of low numbered control characters.  If this sounds confusing, that's because
+it is (but it makes the parsing easy).  Consider the following example for a
+LaTeX environment on the "l" replacement.
 >
   let g:surround_108 = "\\begin{\1environment: \1}\r\\end{\1\1}"
 <
@@ -209,16 +209,10 @@
 end of the line.  Please report any repeatable instances of this.
 
 Do we need to use |inputsave()|/|inputrestore()| with the tag replacement?
-
-Customization isn't very flexible.  Need a system that allows for prompting,
-like with HTML tags and LaTeX environments.  (There is an experimental
-interface for this now).
 
 Indenting is handled haphazardly.  Need to decide the most appropriate
 behavior and implement it.  Right now one can do :let b:surround_indent = 1
 (or the global equivalent) to enable automatic re-indenting by Vim via |=|;
 should this be the default?
 
-It would be nice if |.| would work to repeat an operation.
-
  vim:tw=78:ts=8:ft=help:norl:

Modified: trunk/packages/vim-scripts/html/index.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/index.html?rev=1191&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/index.html (original)
+++ trunk/packages/vim-scripts/html/index.html Tue Feb  5 21:44:23 2008
@@ -48,7 +48,7 @@
    <li><a href="syntax_mkd.vim.html">syntax/mkd.vim.html</a></li>
   </ul>
   <p>
-  Page generated on Fri, 25 Jan 2008 01:50:49 -0500
+  Page generated on Tue, 05 Feb 2008 16:37:58 -0500
 .
   </p>
  </body>

Modified: trunk/packages/vim-scripts/html/plugin_surround.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_surround.vim.html?rev=1191&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_surround.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_surround.vim.html Tue Feb  5 21:44:23 2008
@@ -153,8 +153,8 @@
 <tr>
   <td class="lightbg"><b>&nbsp;script karma&nbsp;</b></td>
   <td>
-    Rating <b>453/128</b>,
-    Downloaded by 3213  </td>
+    Rating <b>481/135</b>,
+    Downloaded by 3395  </td>
 </tr>
 </table>
 <p>
@@ -167,7 +167,7 @@
 <tr><td>utility</td></tr>
 <tr><td>&nbsp;</td></tr>
 <tr><td class="prompt">description</td></tr>
-<tr><td>Surround.vim is all about &quot;surroundings&quot;: parentheses, brackets, quotes, XML tags, and more.&nbsp;&nbsp;The plugin provides mappings to easily delete, change and add such surroundings in pairs.&nbsp;&nbsp;While it works under Vim 6, much of the functionality requires Vim 7.
<br>
<br>Examples follow.&nbsp;&nbsp;It is difficult to provide good examples in the variable width font of this site; check the documentation for more.
<br>
<br>Press cs&quot;' (that's c, s, double quote, single quote) inside
<br>
<br>&quot;Hello world!&quot;
<br>
<br>to change it to
<br>
<br>'Hello world!'
<br>
<br>Now press cs'&lt;q&gt; to change it to
<br>
<br>&lt;q&gt;Hello world!&lt;/q&gt;
<br>
<br>To go full circle, press cst&quot; to get
<br>
<br>&quot;Hello world!&quot;
<br>
<br>To remove the delimiters entirely, press ds' .
<br>
<br>Hello world!
<br>
<br>Now with the cursor on &quot;Hello&quot;, press ysiw] (iw is a text object).
<br>
<br>[Hello] world!
<br>
<br>Let's make that braces and add some space (use &quot;}&quot; instead of &quot;{&quot; 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&lt;em&gt;
<br>
<br>&lt;em&gt;Hello&lt;/em&gt; world!
<br>
<br>Finally, let's try out visual mode. Press a capital V (for linewise visual mode)
<br>followed by S&lt;p class=&quot;important&quot;&gt;.
<br>
<br>&lt;p class=&quot;important&quot;&gt;
<br>&nbsp;&nbsp;&lt;em&gt;Hello&lt;/em&gt; world!
<br>&lt;/p&gt;
<br>
<br>This plugin is very powerful for HTML and XML editing, a niche which currently seems underfilled in Vim land.&nbsp;&nbsp;(As opposed to HTML/XML *inserting*, for which many plugins are available).&nbsp;&nbsp;Adding, changing, and removing pairs of tags simultaneously is a breeze.
<br>
<br>I am currrently seeking input on the ideal semantics of this plugin.&nbsp;&nbsp;For example, how exactly should indenting be handled?&nbsp;&nbsp;What behavior do you think is most desirable?</td></tr>
+<tr><td>Surround.vim is all about &quot;surroundings&quot;: parentheses, brackets, quotes, XML tags, and more.&nbsp;&nbsp;The plugin provides mappings to easily delete, change and add such surroundings in pairs.&nbsp;&nbsp;While it works under Vim 6, much of the functionality requires Vim 7.
<br>
<br>Examples follow.&nbsp;&nbsp;It is difficult to provide good examples in the variable width font of this site; check the documentation for more.
<br>
<br>Press cs&quot;' (that's c, s, double quote, single quote) inside
<br>
<br>&quot;Hello world!&quot;
<br>
<br>to change it to
<br>
<br>'Hello world!'
<br>
<br>Now press cs'&lt;q&gt; to change it to
<br>
<br>&lt;q&gt;Hello world!&lt;/q&gt;
<br>
<br>To go full circle, press cst&quot; to get
<br>
<br>&quot;Hello world!&quot;
<br>
<br>To remove the delimiters entirely, press ds&quot; .
<br>
<br>Hello world!
<br>
<br>Now with the cursor on &quot;Hello&quot;, press ysiw] (iw is a text object).
<br>
<br>[Hello] world!
<br>
<br>Let's make that braces and add some space (use &quot;}&quot; instead of &quot;{&quot; 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&lt;em&gt;
<br>
<br>&lt;em&gt;Hello&lt;/em&gt; world!
<br>
<br>Finally, let's try out visual mode. Press a capital V (for linewise visual mode)
<br>followed by S&lt;p class=&quot;important&quot;&gt;.
<br>
<br>&lt;p class=&quot;important&quot;&gt;
<br>&nbsp;&nbsp;&lt;em&gt;Hello&lt;/em&gt; world!
<br>&lt;/p&gt;
<br>
<br>This plugin is very powerful for HTML and XML editing, a niche which currently seems underfilled in Vim land.&nbsp;&nbsp;(As opposed to HTML/XML *inserting*, for which many plugins are available).&nbsp;&nbsp;Adding, changing, and removing pairs of tags simultaneously is a breeze.
<br>
<br>The &quot;.&quot; 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.&nbsp;&nbsp;I am particularly interested to hear back on the following topics:
<br>
<br>How exactly should indenting be handled?&nbsp;&nbsp;Is the current s/S distinction useful, or should we just always reindent with =?
<br>
<br>Is the s mapping annoying in visual mode? While you can just use c to get the original s function, does it still interfere with motor memory?&nbsp;&nbsp;This can be disabled if you provide your own map instead, but would this be a good default?
<br>
<br>Is the open/closing brace == add/don't add whitespace worth maintaining, or would it be better to just type an extra space before the brace to get said whitespace?</td></tr>
 <tr><td>&nbsp;</td></tr>
 <tr><td class="prompt">install details</td></tr>
 <tr><td>Extract to ~/.vim, or ~\vimfiles (Windows).&nbsp;&nbsp;You'll need to regenerate helptags (fill in the install path below)
<br>
<br>:helptags ~/.vim/doc</td></tr>
@@ -202,6 +202,22 @@
     <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=8229">surround.zip</a></td>
+    <td class="rowodd" valign="top" nowrap><b>1.33</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2008-02-03</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 regressions from previous release.
<br>This is really 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=8185">surround.zip</a></td>
+    <td class="roweven" valign="top" nowrap><b>1.30</b></td>
+    <td class="roweven" valign="top" nowrap><i>2008-01-27</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 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="rowodd" valign="top" nowrap><a href="download_script.php?src_id=7744">surround.zip</a></td>

Modified: trunk/packages/vim-scripts/plugin/surround.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/surround.vim?rev=1191&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/surround.vim (original)
+++ trunk/packages/vim-scripts/plugin/surround.vim Tue Feb  5 21:44:23 2008
@@ -1,7 +1,7 @@
 " surround.vim - Surroundings
 " Author:       Tim Pope <vimNOSPAM at tpope.info>
 " GetLatestVimScripts: 1697 1 :AutoInstall: surround.vim
-" $Id: surround.vim,v 1.27 2007-10-01 15:27:33 tpope Exp $
+" $Id: surround.vim,v 1.33 2008-02-04 03:50:46 tpope Exp $
 "
 " See surround.txt for help.  This can be accessed by doing
 "
@@ -13,7 +13,7 @@
 " ============================================================================
 
 " Exit quickly when:
-" - this plugin was already loaded (or disabled)
+" - this plugin was already loaded or disabled
 " - when 'compatible' is set
 if (exists("g:loaded_surround") && g:loaded_surround) || &cp
     finish
@@ -424,8 +424,11 @@
         exe 'norm '.strcount.'[/d'.strcount.']/'
     else
         exe 'norm d'.strcount.'i'.char
-    endif
-    "exe "norm vi".char."d"
+        " One character backwards
+        if getreg('"') != ""
+            call search('.','bW')
+        endif
+    endif
     let keeper = getreg('"')
     let okeeper = keeper " for reindent below
     if keeper == ""
@@ -436,46 +439,35 @@
     let oldline = getline('.')
     let oldlnum = line('.')
     if char ==# "p"
-        "let append = matchstr(keeper,'\n*\%$')
-        "let keeper = substitute(keeper,'\n*\%$','','')
         call setreg('"','','V')
     elseif char ==# "s" || char ==# "w" || char ==# "W"
         " Do nothing
         call setreg('"','')
     elseif char =~ "[\"'`]"
-        exe "norm! i \<Esc>d2i".char
+        exe "norm! a \<Esc>d2i".char
         call setreg('"',substitute(getreg('"'),' ','',''))
     elseif char == '/'
         norm! "_x
         call setreg('"','/**/',"c")
         let keeper = substitute(substitute(keeper,'^/\*\s\=','',''),'\s\=\*$','','')
     else
-        exe "norm! da".char
+        exe "norm da".char
     endif
     let removed = getreg('"')
     let rem2 = substitute(removed,'\n.*','','')
     let oldhead = strpart(oldline,0,strlen(oldline)-strlen(rem2))
     let oldtail = strpart(oldline,  strlen(oldline)-strlen(rem2))
     let regtype = getregtype('"')
-    if char == 'p'
-        let regtype = "V"
-    endif
     if char =~# '[\[({<T]' || spc
         let keeper = substitute(keeper,'^\s\+','','')
         let keeper = substitute(keeper,'\s\+$','','')
     endif
     if col("']") == col("$") && col('.') + 1 == col('$')
-        "let keeper = substitute(keeper,'^\n\s*','','')
-        "let keeper = substitute(keeper,'\n\s*$','','')
         if oldhead =~# '^\s*$' && a:0 < 2
-            "let keeper = substitute(keeper,oldhead.'\%$','','')
             let keeper = substitute(keeper,'\%^\n'.oldhead.'\(\s*.\{-\}\)\n\s*\%$','\1','')
         endif
         let pcmd = "p"
     else
-        if oldhead == "" && a:0 < 2
-            "let keeper = substitute(keeper,'\%^\n\(.*\)\n\%$','\1','')
-        endif
         let pcmd = "P"
     endif
     if line('.') < oldlnum && regtype ==# "V"
@@ -488,7 +480,6 @@
     silent exe 'norm! ""'.pcmd.'`['
     if removed =~ '\n' || okeeper =~ '\n' || getreg('"') =~ '\n'
         call s:reindent()
-    else
     endif
     if getline('.') =~ '^\s\+$' && keeper =~ '^\s*\n'
         silent norm! cc
@@ -496,6 +487,11 @@
     call setreg('"',removed,regtype)
     let s:lastdel = removed
     let &clipboard = cb_save
+    if newchar == ""
+        silent! call repeat#set("\<Plug>Dsurround".char,scount)
+    else
+        silent! call repeat#set("\<Plug>Csurround".char.newchar,scount)
+    endif
 endfunction " }}}1
 
 function! s:changesurround() " {{{1
@@ -561,6 +557,9 @@
     call setreg(reg,reg_save,reg_type)
     let &selection = sel_save
     let &clipboard = cb_save
+    if a:type =~ '^\d\+$'
+        silent! call repeat#set("\<Plug>Y".(a:0 ? "S" : "s")."surround".char,a:type)
+    endif
 endfunction
 
 function! s:opfunc2(arg)




More information about the pkg-vim-maintainers mailing list