r1288 - in /trunk/packages/vim-scripts: debian/changelog debian/vim-scripts.status ftplugin/xml.vim html/ftplugin_xml.vim.html html/index.html

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Fri Dec 5 18:45:15 UTC 2008


Author: jamessan
Date: Fri Dec  5 18:45:14 2008
New Revision: 1288

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1288
Log:
Update xmledit (Closes: #503707)

Modified:
    trunk/packages/vim-scripts/debian/changelog
    trunk/packages/vim-scripts/debian/vim-scripts.status
    trunk/packages/vim-scripts/ftplugin/xml.vim
    trunk/packages/vim-scripts/html/ftplugin_xml.vim.html
    trunk/packages/vim-scripts/html/index.html

Modified: trunk/packages/vim-scripts/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/changelog?rev=1288&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/changelog (original)
+++ trunk/packages/vim-scripts/debian/changelog Fri Dec  5 18:45:14 2008
@@ -1,7 +1,7 @@
 vim-scripts (20081205-1) UNRELEASED; urgency=low
 
   * Updated addons:
-    - supertab, NERD_commenter
+    - supertab, NERD_commenter, xmledit (Closes: #503707)
   * Renamed addons:
     - themes => color_sample_pack
 

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=1288&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/vim-scripts.status (original)
+++ trunk/packages/vim-scripts/debian/vim-scripts.status Fri Dec  5 18:45:14 2008
@@ -183,9 +183,9 @@
 author:      Devin Weaver
 author_url:  http://www.vim.org/account/profile.php?user_id=667
 email:       devin at tritarget.com
-license:     no license
+license:     GNU GPL, see /usr/share/common-licenses/GPL
 disabledby:  let loaded_xml_ftplugin = 1
-version:     65
+version:     78
 
 script_name: ftplugin/po.vim
 addon:       po

Modified: trunk/packages/vim-scripts/ftplugin/xml.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/ftplugin/xml.vim?rev=1288&op=diff
==============================================================================
--- trunk/packages/vim-scripts/ftplugin/xml.vim (original)
+++ trunk/packages/vim-scripts/ftplugin/xml.vim Fri Dec  5 18:45:14 2008
@@ -2,8 +2,8 @@
 " FileType:     XML
 " Author:       Devin Weaver <vim (at) tritarget.com> 
 " Maintainer:   Devin Weaver <vim (at) tritarget.com>
-" Last Change:  $Date: 2008-02-08 23:41:48 -0500 (Fri, 08 Feb 2008) $
-" Version:      $Revision: 65 $
+" Last Change:  $Date: 2008-10-16 10:01:12 -0400 (Thu, 16 Oct 2008) $
+" Version:      $Revision: 78 $
 " Location:     http://www.vim.org/scripts/script.php?script_id=301
 " Licence:      This program is free software; you can redistribute it
 "               and/or modify it under the terms of the GNU General Public
@@ -47,7 +47,6 @@
 if exists("b:did_ftplugin")
   finish
 endif
-let b:did_ftplugin = 1
 " sboles, init these variables so vim doesn't complain on wrap cancel
 let b:last_wrap_tag_used = ""
 let b:last_wrap_atts_used = ""
@@ -182,7 +181,7 @@
 
     if <SID>IsParsableTag (ltag)
         " find the break between tag name and atributes (or closing of tag)
-	let index = matchend (ltag, '[[:alnum:]_:\-]\+')
+        let index = matchend (ltag, '[[:alnum:]_:\-]\+')
 
         let tag_name = strpart (ltag, 1, index - 1)
         if strpart (ltag, index) =~ '[^/>[:blank:]]'
@@ -211,19 +210,19 @@
                 let com_save = &comments
                 set comments-=n:>
                 execute "normal! a\<Cr>\<Cr>\<Esc>kAx\<Esc>>>$\"xx"
-                execute "set comments=" . com_save
-
-                " restore registers
-                let @" = old_reg_save
-                let @x = old_save_x
-
-                startinsert!
-                return ""
+                execute "set comments=" . substitute(com_save, " ", "\\\\ ", "g")
             else
                 if has_attrib == 0
                     call <SID>Callback (tag_name, html_mode)
                 endif
-                execute "normal! a</" . tag_name . ">\<Esc>" . index . "h"
+                if exists("g:xml_jump_string")
+                    let index = index + strlen(g:xml_jump_string)
+                    let jump_char = g:xml_jump_string
+                    call <SID>InitEditFromJump()
+                else
+                    let jump_char = ""
+                endif
+                execute "normal! a</" . tag_name . ">" . jump_char . "\<Esc>" . index . "h"
             endif
         endif
     endif
@@ -232,11 +231,11 @@
     let @" = old_reg_save
     let @x = old_save_x
 
-    if col (".") < strlen (getline ("."))
+    if multi_line
+        startinsert!
+    else
         execute "normal! l"
         startinsert
-    else
-        startinsert!
     endif
 endfunction
 endif
@@ -456,10 +455,10 @@
 if !exists("*s:VisualTag")
 function s:VisualTag( ) 
     if strpart (getline ("."), col (".") - 1, 1) == "<"
-	normal! l
+        normal! l
     endif
     if search ("<[^\/]", "bW") == 0
-	return
+        return
     endif
     normal! mz
     normal \5
@@ -473,6 +472,10 @@
 " Else continue editing
 if !exists("*s:InsertGt")
 function s:InsertGt( )
+  let save_matchpairs = &matchpairs
+  set matchpairs-=<:>
+  execute "normal! a>"
+  execute "set matchpairs=" . save_matchpairs
   " When the current char is text within a tag it will not proccess as a
   " syntax'ed element and return nothing below. Since the multi line wrap
   " feture relies on using the '>' char as text within a tag we must use the
@@ -480,7 +483,7 @@
   if (getline('.')[col('.') - 1] == '>')
     let char_syn=synIDattr(synID(line("."), col(".") - 1, 1), "name")
   endif
-  if 0 == match(char_syn, 'html') || 0 == match(char_syn, 'xml')
+  if -1 == match(char_syn, "xmlProcessing") && (0 == match(char_syn, 'html') || 0 == match(char_syn, 'xml'))
     call <SID>ParseTag()
   else
     if col(".") == col("$") - 1
@@ -490,6 +493,38 @@
       startinsert
     endif
   endif
+endfunction
+endif
+
+" InitEditFromJump -> Set some needed autocommands and syntax highlights for EditFromJump. {{{1
+if !exists("*s:InitEditFromJump")
+function s:InitEditFromJump( )
+    " Add a syntax highlight for the xml_jump_string.
+    execute "syntax match Error /\\V" . g:xml_jump_string . "/"
+    " Remove left over garbage from xml_jump_string on file save.
+    augroup xml
+        execute "au BufWritePre <buffer> %s/" . g:xml_jump_string . "//ge"
+    augroup END
+endfunction
+endif
+
+" EditFromJump -> Jump to the end of the tag and continue editing. {{{1
+" g:xml_jump_string must be set.
+if !exists("*s:EditFromJump")
+function s:EditFromJump( )
+    if exists("g:xml_jump_string")
+        let foo = search(g:xml_jump_string, 'csW') " Moves cursor by default
+        execute "normal! " . strlen(g:xml_jump_string) . "x"
+        if col(".") == col("$") - 1
+            startinsert!
+        else
+            startinsert
+        endif
+    else
+        echohl WarningMsg
+        echo "Function disabled. xml_jump_string not defined."
+        echohl None
+    endif
 endfunction
 endif
 
@@ -617,7 +652,7 @@
 " }}}2
 
 let s:revision=
-      \ substitute("$Revision: 65 $",'\$\S*: \([.0-9]\+\) \$','\1','')
+      \ substitute("$Revision: 78 $",'\$\S*: \([.0-9]\+\) \$','\1','')
 silent! let s:install_status =
     \ s:XmlInstallDocumentation(expand('<sfile>:p'), s:revision)
 if (s:install_status == 1)
@@ -651,9 +686,18 @@
 " Parse the tag after pressing the close '>'.
 if !exists("g:xml_tag_completion_map")
     " inoremap <buffer> > ><Esc>:call <SID>ParseTag()<Cr>
-    inoremap <buffer> > ><Esc>:call <SID>InsertGt()<Cr>
+    inoremap <buffer> > <Esc>:call <SID>InsertGt()<Cr>
 else
-    execute "inoremap <buffer> " . g:xml_tag_completion_map . " ><Esc>:call <SID>ParseTag()<Cr>"
+    execute "inoremap <buffer> " . g:xml_tag_completion_map . " <Esc>:call <SID>InsertGt()<Cr>"
+endif
+
+if exists("g:xml_jump_string")
+    nnoremap <buffer> <LocalLeader><Space> :call <SID>EditFromJump()<Cr>
+    inoremap <buffer> <LocalLeader><Space> <Esc>:call <SID>EditFromJump()<Cr>
+    " Clear out all left over xml_jump_string garbage
+    execute "nnoremap <buffer> <LocalLeader><LocalLeader> :%s/" . g:xml_jump_string . "//ge<Cr>"
+    " The syntax files clear out any predefined syntax definitions. Recreate
+    " this when ever a xml_jump_string is created. (in ParseTag)
 endif
 
 augroup xml
@@ -669,7 +713,7 @@
 === START_DOC
 *xml-plugin.txt*  Help edit XML and SGML documents.                  #version#
 
-				   XML Edit {{{2 ~
+                                   XML Edit {{{2 ~
 
 A filetype plugin to help edit XML and SGML documents.
 
@@ -712,17 +756,29 @@
   completion algorithm can not.
 
 ------------------------------------------------------------------------------
-							 *xml-plugin-mappings*
+                                                         *xml-plugin-mappings*
 Mappings {{{2 ~
 
 <LocalLeader> is a setting in VIM that depicts a prefix for scripts and
 plugins to use. By default this is the backslash key `\'. See |mapleader|
 for details.
 
+<LocalLeader>Space
+        Normal or Insert - Continue editing after the ending tag. This
+        option requires xml_jump_string to be set to function. When a tag
+        is completed it will append the xml_jump_string. Once this mapping
+        is ran it will delete the next xml_jump_string pattern to the right
+        of the curser and delete it leaving you in insert mode to continue
+        editing.
+
+<LocalLeader><LocalLeader>
+        Normal - Will clear the entire file of left over xml_jump_string garbage.
+        * This will also happen automatically when you save the file. *
+
 <LocalLeader>x
-	Visual - Place a custom XML tag to suround the selected text. You
-	need to have selected text in visual mode before you can use this
-	mapping. See |visual-mode| for details.
+        Visual - Place a custom XML tag to suround the selected text. You
+        need to have selected text in visual mode before you can use this
+        mapping. See |visual-mode| for details.
 
 <LocalLeader>.   or      <LocalLeader>>
         Insert - Place a literal '>' without parsing tag.
@@ -740,43 +796,52 @@
 <
 
 ------------------------------------------------------------------------------
-							 *xml-plugin-settings*
+                                                         *xml-plugin-settings*
 Options {{{2 ~
 
 (All options must be placed in your |.vimrc| prior to the |ftplugin|
 command.)
 
 xml_tag_completion_map
-	Use this setting to change the default mapping to auto complete a
-	tag. By default typing a literal `>' will cause the tag your editing
-	to auto complete; pressing twice will auto nest the tag. By using
-	this setting the `>' will be a literal `>' and you must use the new
-	mapping to perform auto completion and auto nesting. For example if
-	you wanted Control-L to perform auto completion inmstead of typing a
-	`>' place the following into your .vimrc: >
+        Use this setting to change the default mapping to auto complete a
+        tag. By default typing a literal `>' will cause the tag your editing
+        to auto complete; pressing twice will auto nest the tag. By using
+        this setting the `>' will be a literal `>' and you must use the new
+        mapping to perform auto completion and auto nesting. For example if
+        you wanted Control-L to perform auto completion inmstead of typing a
+        `>' place the following into your .vimrc: >
             let xml_tag_completion_map = "<C-l>"
 <
 xml_no_auto_nesting
-	This turns off the auto nesting feature. After a completion is made
-	and another `>' is typed xml-edit automatically will break the tag
-	accross multiple lines and indent the curser to make creating nested
-	tqags easier. This feature turns it off. Enter the following in your
-	.vimrc: >
+        This turns off the auto nesting feature. After a completion is made
+        and another `>' is typed xml-edit automatically will break the tag
+        accross multiple lines and indent the curser to make creating nested
+        tqags easier. This feature turns it off. Enter the following in your
+        .vimrc: >
             let xml_no_auto_nesting = 1
 <
 xml_use_xhtml
-	When editing HTML this will auto close the short tags to make valid
-	XML like <hr /> and <br />. Enter the following in your vimrc to
-	turn this option on: >
+        When editing HTML this will auto close the short tags to make valid
+        XML like <hr /> and <br />. Enter the following in your vimrc to
+        turn this option on: >
             let xml_use_xhtml = 1
 <
 xml_no_html
-	This turns of the support for HTML specific tags. Place this in your
+        This turns of the support for HTML specific tags. Place this in your
         .vimrc: >
             let xml_no_html = 1
 <
+xml_jump_string
+        This turns of the support for continuing edits after an ending tag.
+        xml_jump_string can be any string how ever a simple character will
+        serfice. Pick a character or small string that is unique and will
+        not interfer with your normal editing. See the <LocalLeader>Space
+        mapping for more.
+        .vimrc: >
+            let xml_jump_string = "`"
+<
 ------------------------------------------------------------------------------
-							*xml-plugin-callbacks*
+                                                        *xml-plugin-callbacks*
 Callback Functions {{{2 ~
 
 A callback function is a function used to customize features on a per tag
@@ -796,13 +861,13 @@
 The following are implemented callback functions:
 
 HtmlAttribCallback
-	This is used to add default attributes to html tag. It is intended
-	for HTML files only.
+        This is used to add default attributes to html tag. It is intended
+        for HTML files only.
 
 XmlAttribCallback
-	This is a generic callback for xml tags intended to add attributes.
-
-							     *xml-plugin-html*
+        This is a generic callback for xml tags intended to add attributes.
+
+                                                             *xml-plugin-html*
 Callback Example {{{2 ~
 
 The following is an example of using XmlAttribCallback in your .vimrc
@@ -849,9 +914,9 @@
           return "src=\"\" width=\"0\" height=\"0\" border=\"0\" alt=\"\""
       elseif a:xml_tag ==? "a"
           if has("browse")
-	      " Look up a file to fill the href. Used in local relative file
-	      " links. typeing your own href before closing the tag with `>'
-	      " will override this.
+              " Look up a file to fill the href. Used in local relative file
+              " links. typeing your own href before closing the tag with `>'
+              " will override this.
               let cwd = getcwd()
               let cwd = substitute (cwd, "\\", "/", "g")
               let href = browse (0, "Link to href...", getcwd(), "")
@@ -872,6 +937,5 @@
 <
 === END_DOC
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" v im:tw=78:ts=8:ft=help:norl:
-" vim600: set foldmethod=marker  tabstop=8 shiftwidth=2 softtabstop=2 smartindent smarttab  :
-"fileencoding=iso-8859-15 
+" vim: set tabstop=8 shiftwidth=4 softtabstop=4 smartindent
+" vim600: set foldmethod=marker smarttab fileencoding=iso-8859-15 

Modified: trunk/packages/vim-scripts/html/ftplugin_xml.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/ftplugin_xml.vim.html?rev=1288&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/ftplugin_xml.vim.html (original)
+++ trunk/packages/vim-scripts/html/ftplugin_xml.vim.html Fri Dec  5 18:45:14 2008
@@ -153,8 +153,8 @@
 <tr>
   <td class="lightbg"><b>&nbsp;script karma&nbsp;</b></td>
   <td>
-    Rating <b>883/329</b>,
-    Downloaded by 16946  </td>
+    Rating <b>1055/393</b>,
+    Downloaded by 20108  </td>
 </tr>
 </table>
 <p>
@@ -204,20 +204,28 @@
     <th valign="top">release notes</th>
 </tr>
 <tr>
-        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=8245">xml.vim</a></td>
-    <td class="rowodd" valign="top" nowrap><b>65</b></td>
-    <td class="rowodd" valign="top" nowrap><i>2008-02-08</i></td>
+        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=9358">xml.vim</a></td>
+    <td class="rowodd" valign="top" nowrap><b>78</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2008-10-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=667">Devin Weaver</a></i></td>
-    <td class="rowodd" valign="top" width="2000">Several bug fixes and latest development snap shot.</td>
-</tr>
-<tr>
-        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=4280">xml.vim</a></td>
-    <td class="roweven" valign="top" nowrap><b>1.29</b></td>
-    <td class="roweven" valign="top" nowrap><i>2005-05-14</i></td>
-    <td class="roweven" valign="top" nowrap>6.0</td>
+    <td class="rowodd" valign="top" width="2000">Added functions to jump to the end of a tag and continue editing using a custom match string. Fixed compatibility bug with omni completion. Fixed several bugs concerning xml processing tags, php, and annoying beeps everywhere.</td>
+</tr>
+<tr>
+        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=8245">xml.vim</a></td>
+    <td class="roweven" valign="top" nowrap><b>65</b></td>
+    <td class="roweven" valign="top" nowrap><i>2008-02-08</i></td>
+    <td class="roweven" valign="top" nowrap>7.0</td>
     <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=667">Devin Weaver</a></i></td>
-    <td class="roweven" valign="top" width="2000">Fixed some documentation. Added &lt;a&gt; tag to html example.
<br>Added Visual select tag mapping. Cosmetics</td>
+    <td class="roweven" valign="top" width="2000">Several bug fixes and latest development snap shot.</td>
+</tr>
+<tr>
+        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=4280">xml.vim</a></td>
+    <td class="rowodd" valign="top" nowrap><b>1.29</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2005-05-14</i></td>
+    <td class="rowodd" valign="top" nowrap>6.0</td>
+    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=667">Devin Weaver</a></i></td>
+    <td class="rowodd" valign="top" width="2000">Fixed some documentation. Added &lt;a&gt; tag to html example.
<br>Added Visual select tag mapping. Cosmetics</td>
 </tr>
 </table>
 <!-- finish off the framework -->
@@ -225,6 +233,7 @@
         </tr>
       </table>
     </td>
+
   </tr>
 </table>
 
@@ -263,8 +272,7 @@
           </td>
 
     <td align="right" valign="top">
-      	<a href="http://www.webconceptgroup.net"><img src="/images/logo_sponsor_wcg.jpg" width="131" height="30" border="0" alt="Sponsored by Web Concept Group Inc."></a>
-	<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
+      		<a href="http://sourceforge.net" 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>

Modified: trunk/packages/vim-scripts/html/index.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/index.html?rev=1288&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/index.html (original)
+++ trunk/packages/vim-scripts/html/index.html Fri Dec  5 18:45:14 2008
@@ -51,7 +51,7 @@
    <li><a href="syntax_mkd.vim.html">syntax/mkd.vim.html</a></li>
   </ul>
   <p>
-  Page generated on Fri, 05 Dec 2008 13:35:21 -0500
+  Page generated on Fri, 05 Dec 2008 13:44:05 -0500
 .
   </p>
  </body>




More information about the pkg-vim-maintainers mailing list