[SCM] vim-scripts packaging branch, master, updated. 94d6931b39bc216e79e1673187150bfec7383e86

James Vega jamessan at debian.org
Wed Sep 2 03:33:51 UTC 2009


The following commit has been merged in the master branch:
commit 3862288274388a0dd8d21796fe3bdd2655437f35
Author: James Vega <jamessan at debian.org>
Date:   Tue Sep 1 20:45:33 2009 -0400

    Update supertab to 0.51

diff --git a/debian/changelog b/debian/changelog
index 3bf9838..9279ecc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ vim-scripts (20090211-2) UNRELEASED; urgency=low
   * Switch from dpatch to quilt.
   * Remove git-commit script.  Vim is shipped with more complete scripts.
     (Closes: #539380)
+  * addons upgrades:
+    - supertab
 
  -- James Vega <jamessan at debian.org>  Mon, 31 Aug 2009 18:14:35 -0400
 
diff --git a/debian/patches/disabledby-supertab.diff b/debian/patches/disabledby-supertab.diff
index 3522de0..5e4288a 100644
--- a/debian/patches/disabledby-supertab.diff
+++ b/debian/patches/disabledby-supertab.diff
@@ -4,9 +4,9 @@ Index: vim-scripts/plugin/supertab.vim
 ===================================================================
 --- vim-scripts.orig/plugin/supertab.vim
 +++ vim-scripts/plugin/supertab.vim
-@@ -54,6 +54,11 @@
- "     $ vim -u NONE -U NONE -c "set nocp | runtime plugin/supertab.vim"
- " }}}
+@@ -58,6 +58,11 @@
+   finish
+ endif
  
 +if exists("loaded_supertab")
 +  finish
diff --git a/debian/vim-scripts.status b/debian/vim-scripts.status
index 619d56c..3386dfd 100644
--- a/debian/vim-scripts.status
+++ b/debian/vim-scripts.status
@@ -321,7 +321,7 @@ author_url:  http://www.vim.org/account/profile.php?user_id=6016
 email:       ervandew at yahoo.com
 license:     BSD, see /usr/share/common-licenses/BSD
 disabledby:  let loaded_supertab = 1
-version:     0.49
+version:     0.51
 
 script_name: plugin/lbdbq.vim
 addon:       lbdbq
diff --git a/html/index.html b/html/index.html
index 028f662..16aed58 100644
--- a/html/index.html
+++ b/html/index.html
@@ -50,7 +50,7 @@
    <li><a href="syntax_mkd.vim.html">syntax/mkd.vim.html</a></li>
   </ul>
   <p>
-  Page generated on Sat, 06 Jun 2009 01:46:03 -0400
+  Page generated on Tue, 01 Sep 2009 20:43:20 -0400
 .
   </p>
  </body>
diff --git a/html/plugin_supertab.vim.html b/html/plugin_supertab.vim.html
index 91a1962..3bc673e 100644
--- a/html/plugin_supertab.vim.html
+++ b/html/plugin_supertab.vim.html
@@ -166,8 +166,8 @@
 <tr>
   <td class="lightbg"><b>&nbsp;script karma&nbsp;</b></td>
   <td>
-    Rating <b>775/235</b>,
-    Downloaded by 14468  </td>
+    Rating <b>889/273</b>,
+    Downloaded by 16892  </td>
 </tr>
 </table>
 <p>
@@ -217,6 +217,22 @@ Click on the package to download.
     <th valign="top">release notes</th>
 </tr>
 <tr>
+        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=10998">supertab.vim</a></td>
+    <td class="rowodd" valign="top" nowrap><b>0.51</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2009-07-11</i></td>
+    <td class="rowodd" valign="top" nowrap>7.0</td>
+    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=6016">Eric Van Dewoestine</a></i></td>
+    <td class="rowodd" valign="top" width="2000">Replaced internal function s:IsWordChar with vim's keyword character class (Thanks to Ingo Karkat for the patch).</td>
+</tr>
+<tr>
+        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=10900">supertab.vim</a></td>
+    <td class="roweven" valign="top" nowrap><b>0.50</b></td>
+    <td class="roweven" valign="top" nowrap><i>2009-06-26</i></td>
+    <td class="roweven" valign="top" nowrap>7.0</td>
+    <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=6016">Eric Van Dewoestine</a></i></td>
+    <td class="roweven" valign="top" width="2000">Added check for vim 7 or greater, otherwise disable supertab support (suggested by Vincent Lee).&nbsp;&nbsp;Also, removed any remaining pre vim 7 logic that is no longer applicable.</td>
+</tr>
+<tr>
         <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=9918">supertab.vim</a></td>
     <td class="rowodd" valign="top" nowrap><b>0.49</b></td>
     <td class="rowodd" valign="top" nowrap><i>2009-02-05</i></td>
diff --git a/plugin/supertab.vim b/plugin/supertab.vim
index d6ce993..cda61bd 100644
--- a/plugin/supertab.vim
+++ b/plugin/supertab.vim
@@ -2,7 +2,7 @@
 "   Original: Gergely Kontra <kgergely at mcl.hu>
 "   Current:  Eric Van Dewoestine <ervandew at gmail.com> (as of version 0.4)
 "   Please direct all correspondence to Eric.
-" Version: 0.49
+" Version: 0.51
 "
 " Description: {{{
 "   Use your tab key to do all your completion in insert mode!
@@ -54,6 +54,10 @@
 "     $ vim -u NONE -U NONE -c "set nocp | runtime plugin/supertab.vim"
 " }}}
 
+if v:version < 700
+  finish
+endif
+
 if exists('complType') " Integration with other completion functions.
   finish
 endif
@@ -194,22 +198,16 @@ endif
     \ "|<c-x><c-]>| - Tags.\n" .
     \ "|<c-x><c-f>| - File names.\n" .
     \ "|<c-x><c-d>| - Definitions or macros.\n" .
-    \ "|<c-x><c-v>| - Vim command-line."
-  if v:version >= 700
-    let s:tabHelp = s:tabHelp . "\n" .
-      \ "|<c-x><c-u>| - User defined completion.\n" .
-      \ "|<c-x><c-o>| - Omni completion.\n" .
-      \ "|<c-x>s|     - Spelling suggestions."
-  endif
+    \ "|<c-x><c-v>| - Vim command-line.\n" .
+    \ "|<c-x><c-u>| - User defined completion.\n" .
+    \ "|<c-x><c-o>| - Omni completion.\n" .
+    \ "|<c-x>s|     - Spelling suggestions."
 
   " set the available completion types and modes.
   let s:types =
-    \ "\<c-e>\<c-y>\<c-l>\<c-n>\<c-k>\<c-t>\<c-i>\<c-]>\<c-f>\<c-d>\<c-v>\<c-n>\<c-p>"
-  let s:modes = '/^E/^Y/^L/^N/^K/^T/^I/^]/^F/^D/^V/^P'
-  if v:version >= 700
-    let s:types = s:types . "\<c-u>\<c-o>\<c-n>\<c-p>s"
-    let s:modes = s:modes . '/^U/^O/s'
-  endif
+    \ "\<c-e>\<c-y>\<c-l>\<c-n>\<c-k>\<c-t>\<c-i>\<c-]>" .
+    \ "\<c-f>\<c-d>\<c-v>\<c-n>\<c-p>\<c-u>\<c-o>\<c-n>\<c-p>s"
+  let s:modes = '/^E/^Y/^L/^N/^K/^T/^I/^]/^F/^D/^V/^P/^U/^O/s'
   let s:types = s:types . "np"
   let s:modes = s:modes . '/n/p'
 
@@ -217,7 +215,7 @@ endif
 
 " CtrlXPP() {{{
 " Handles entrance into completion mode.
-function! CtrlXPP ()
+function! CtrlXPP()
   if &smd
     echo '' | echo '-- ^X++ mode (' . s:modes . ')'
   endif
@@ -255,13 +253,13 @@ endfunction " }}}
 " of that type or use SuperTabHelp.
 " Example mapping to restore SuperTab default:
 "   nmap <F6> :call SetSuperTabCompletionType("<c-p>")<cr>
-function! SuperTabSetCompletionType (type)
+function! SuperTabSetCompletionType(type)
   exec "let b:complType = \"" . escape(a:type, '<') . "\""
 endfunction " }}}
 
 " s:Init {{{
 " Global initilization when supertab is loaded.
-function! s:Init ()
+function! s:Init()
   augroup supertab_init
     autocmd!
     autocmd BufEnter * call <SID>InitBuffer()
@@ -277,23 +275,16 @@ function! s:Init ()
   " Setup mechanism to restore orignial completion type upon leaving insert
   " mode if g:SuperTabRetainCompletionType == 2
   if g:SuperTabRetainCompletionType == 2
-    " pre vim 7, must map <esc>
-    if v:version < 700
-      imap <silent> <ESC> <ESC>:call s:SetDefaultCompletionType()<cr>
-
-    " since vim 7, we can use InsertLeave autocmd.
-    else
-      augroup supertab_retain
-        autocmd!
-        autocmd InsertLeave * call s:SetDefaultCompletionType()
-      augroup END
-    endif
+    augroup supertab_retain
+      autocmd!
+      autocmd InsertLeave * call s:SetDefaultCompletionType()
+    augroup END
   endif
 endfunction " }}}
 
 " s:InitBuffer {{{
 " Per buffer initilization.
-function! s:InitBuffer ()
+function! s:InitBuffer()
   if exists("b:complType")
     return
   endif
@@ -331,72 +322,10 @@ function! s:InitBuffer ()
   call SuperTabSetCompletionType(b:SuperTabDefaultCompletionType)
 endfunction " }}}
 
-" s:IsWordChar(char) {{{
-" Determines if the supplied character is a word character or matches value
-" defined by 'iskeyword'.
-function! s:IsWordChar (char)
-  if a:char =~ '\w'
-    return 1
-  endif
-
-  " check against 'iskeyword'
-  let values = &iskeyword
-  let index = stridx(values, ',')
-  while index > 0 || values != ''
-    if index > 0
-      let value = strpart(values, 0, index)
-      let values = strpart(values, index + 1)
-    else
-      let value = values
-      let values = ''
-    endif
-
-    " exception case for '^,'
-    if value == '^'
-      let value = '^,'
-
-    " execption case for ','
-    elseif value =~ '^,,'
-      let values .= strpart(value, 2)
-      let value = ','
-
-    " execption case after a ^,
-    elseif value =~ '^,'
-      let value = strpart(value, 1)
-    endif
-
-    " keyword values in an ascii number range
-    if value =~ '[0-9]\+-[0-9]\+'
-      let charnum = char2nr(a:char)
-      exec 'let start = ' . substitute(value, '\([0-9]\+\)-.*', '\1', '')
-      exec 'let end = ' . substitute(value, '.*-\([0-9]\+\)', '\1', '')
-
-      if charnum >= start && charnum <= end
-        return 1
-      endif
-
-    " keyword value is a set of include or exclude characters
-    else
-      let include = 1
-      if value =~ '^\^'
-        let value = strpart(value, 1)
-        let include = 0
-      endif
-
-      if a:char =~ '[' . escape(value, '[]') . ']'
-        return include
-      endif
-    endif
-    let index = stridx(values, ',')
-  endwhile
-
-  return 0
-endfunction " }}}
-
 " s:SetCompletionType() {{{
 " Sets the completion type based on what the user has chosen from the help
 " buffer.
-function! s:SetCompletionType ()
+function! s:SetCompletionType()
   let chosen = substitute(getline('.'), '.*|\(.*\)|.*', '\1', '')
   if chosen != getline('.')
     let winnr = b:winnr
@@ -407,7 +336,7 @@ function! s:SetCompletionType ()
 endfunction " }}}
 
 " s:SetDefaultCompletionType() {{{
-function! s:SetDefaultCompletionType ()
+function! s:SetDefaultCompletionType()
   if exists('b:SuperTabDefaultCompletionType') && !b:complCommandLine
     call SuperTabSetCompletionType(b:SuperTabDefaultCompletionType)
   endif
@@ -417,7 +346,7 @@ endfunction " }}}
 " Used to perform proper cycle navigation as the user requests the next or
 " previous entry in a completion list, and determines whether or not to simply
 " retain the normal usage of <tab> based on the cursor position.
-function! s:SuperTab (command)
+function! s:SuperTab(command)
   if s:WillComplete()
     " rare case where no autocmds have fired for this buffer to initialize the
     " supertab vars.
@@ -472,7 +401,7 @@ endfunction " }}}
 
 " s:SuperTabHelp() {{{
 " Opens a help window where the user can choose a completion type to enter.
-function! s:SuperTabHelp ()
+function! s:SuperTabHelp()
   let winnr = winnr()
   if bufwinnr("SuperTabHelp") == -1
     botright split SuperTabHelp
@@ -505,7 +434,7 @@ endfunction " }}}
 
 " s:WillComplete() {{{
 " Determines if completion should be kicked off at the current location.
-function! s:WillComplete ()
+function! s:WillComplete()
   let line = getline('.')
   let cnum = col('.')
 
@@ -517,12 +446,12 @@ function! s:WillComplete ()
 
   " Within a word, but user does not have mid word completion enabled.
   let next_char = strpart(line, cnum - 1, 1)
-  if !g:SuperTabMidWordCompletion && s:IsWordChar(next_char)
+  if !g:SuperTabMidWordCompletion && next_char =~ '\k'
     return 0
   endif
 
   " In keyword completion mode and no preceding word characters.
-  "if (b:complType == "\<c-n>" || b:complType == "\<c-p>") && !s:IsWordChar(prev_char)
+  "if (b:complType == "\<c-n>" || b:complType == "\<c-p>") && prev_char !~ '\k'
   "  return 0
   "endif
 

-- 
vim-scripts packaging



More information about the pkg-vim-maintainers mailing list