Commits

Ches Martin committed deffa2c

vim: Remove tracked plugins that should be installed by Vundle

  • Participants
  • Parent commits b1d6b25

Comments (0)

Files changed (12)

File .vim/bundle/TailMinusF/README

-This is a mirror of http://www.vim.org/scripts/script.php?script_id=1374
-
-TailMinusF allows you to view the contents of a file in real time.  When a
-change in the file is detected, the window displaying the file is updated and
-repositioned to the last line.
-
-The update is not exactly real time, but usually updates within a few seconds
-of the file change.  The update interval of the output is determined by the
-|updatetime| parameter, along with continued usage of Vim.  This means that if
-you are not doing any editing or motion commands, the preview window will not
-be updated.  See |CursorHold| for more information.
-
-Because this window becomes the preview window, it will accept all related
-commands.  For more information, see |preview-window|.
-
-Once installed, simply use &#039:Tail <filename>&#039 to see the file.
- Use ':pclose' to close this window.

File .vim/bundle/TailMinusF/doc/tags

-'TailMinusF_Height'	tailminusf.txt	/*'TailMinusF_Height'*
-:Tail	tailminusf.txt	/*:Tail*
-TailMinusF.txt	tailminusf.txt	/*TailMinusF.txt*
-tailminusf-about	tailminusf.txt	/*tailminusf-about*
-tailminusf-commands	tailminusf.txt	/*tailminusf-commands*
-tailminusf-configure	tailminusf.txt	/*tailminusf-configure*

File .vim/bundle/TailMinusF/doc/tailminusf.txt

-*TailMinusF.txt*	Watch the contents of a file in real time
-
-Author: Jason Heddings (jason@heddings.com)
-For Vim version 6.0 and above
-Last change: 05 October, 2005
-
-1. Overview                                     |tailminusf-about|
-2. Commands                                     |tailminusf-commands|
-3. Configuration 				|tailminusf-configure|
-
-==============================================================================
-                                                *tailminusf-about*
-1. Overview~
-
-TailMinusF allows you to view the contents of a file in real time.  When a
-change in the file is detected, the window displaying the file is updated and
-repositioned to the last line.
-
-The update is not exactly real time, but usually updates within a few seconds
-of the file change.  The update interval of the output is determined by the
-|updatetime| parameter, along with continued usage of Vim.  This means that if
-you are not doing any editing or motion commands, the preview window will not
-be updated.  See |CursorHold| for more information.
-
-Because this window becomes the preview window, it will accept all related
-commands.  For more information, see |preview-window|.
-
-==============================================================================
-                                                *tailminusf-commands*
-2. Commands~
-
-The TailMinusF plugin does not create any automatic mappings, but provides the
-following commands:
-
-|:Tail|          begin watching the specified file
-
-                                                *:Tail*
-:Tail <filename>
-        Begin watching the specified file in the preview window.  This will
-        cause any existing preview windows to be closed.  If the file is
-        already open in another buffer, that buffer will be wiped out.
-
-Once open, the window accepts all preview window commands.  For example, to
-close the preview window, use |:pclose|.
-
-==============================================================================
-                                                *tailminusf-configure*
-2. Configuration~
-
-TailMinusF may be customized using variables set by the |let| command in your
-.vimrc file.  The default values for the options are shown in square brackets.
-
-|'TailMinusF_Height'|      Specify the height of the preview window [10]
-|'TailMinusF_Center_Win'|  Center the output in the preview window   [0]
-
-                                                *'TailMinusF_Height'*
-TailMinusF_Height~
-  Using this setting, you can alter the height of the preview window that is
-  created when |:Tail| is called for a file.  >
-      let g:TailMinusF_Height = 12
-<
-TailMinusF_Center_Win~
-  When set to true, this will cause the last line of the output to be centered
-  in the preview window.  By default, the last line of output will be on the
-  last line of the window >
-      let g:TailMinusF_Center_Win = 1
-<
-==============================================================================
-vim:textwidth=78:tabstop=8:noexpandtab:filetype=help

File .vim/bundle/TailMinusF/plugin/tailminusf.vim

-" File: tailminusf.vim
-" Author: Jason Heddings (vim at heddway dot com)
-" Version: 1.1
-" Last Modified: 05 October, 2005
-"
-" See ':help tailminusf' for more information.
-"   
-if exists('g:TailMinusF_Loaded')
-  finish
-endif
-let g:TailMinusF_Loaded = 1
-
-
-" set the default options for the plugin
-if !exists("g:TailMinusF_Height")
-  let g:TailMinusF_Height = 10
-endif
-if !exists("g:TailMinusF_Center_Win")
-  let g:TailMinusF_Center_Win = 0
-endif
-
-
-" command exports
-command -nargs=1 -complete=file Tail call TailMinusF(<q-args>)
-
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" sets up the preview window to watch the specified file for changes
-function! TailMinusF(file)
-  let g:TailMinusF_status = "|"
-  let l:file = substitute(expand(a:file), "\\", "/", "g")
-
-  if !filereadable(l:file)
-    echohl ErrorMsg | echo "Cannot open for reading: " . l:file | echohl None
-    return
-  endif
-
-  " if the buffer is already open, kill it
-  pclose  " in case there is a preview window already, also removes autocmd's
-  if bufexists(bufnr(l:file))
-    execute ':' . bufnr(l:file) . 'bwipeout'
-  endif
-
-  " set it up to be watched closely
-  augroup TailMinusF
-    " monitor calls -- try to catch the update as much as possible
-    autocmd CursorHold * call TailMinusF_Monitor()
-    autocmd FocusLost * call TailMinusF_Monitor()
-    autocmd FocusGained * call TailMinusF_Monitor()
-
-    " utility calls
-    execute "autocmd BufWinEnter " . l:file . " call TailMinusF_Setup()"
-    execute "autocmd BufWinLeave " . l:file . " call TailMinusF_Stop()"
-    execute "autocmd FileChangedShell " . l:file . " :call TailMinusF_Refresh()"
-  augroup END
-
-  " set up the new window with minimal functionality
-  silent execute g:TailMinusF_Height . "new " . l:file
-endfunction
-
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" used by TailMinusF to check the file status
-function! TailMinusF_Monitor()
-  " do our file change checks
-  checktime   " the easy check
-
-  " update the status indicator
-  if g:TailMinusF_status == "|"
-    let g:TailMinusF_status = "/"
-  elseif g:TailMinusF_status == "/"
-    let g:TailMinusF_status = "-"
-  elseif g:TailMinusF_status == "-"
-    let g:TailMinusF_status = "\\"
-  elseif g:TailMinusF_status == "\\"
-    let g:TailMinusF_status = "|"
-  endif
-  return g:TailMinusF_status
-endfunction
-
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" used by TailMinusF to set up the preview window settings
-function! TailMinusF_Setup()
-  setlocal noswapfile
-  setlocal noshowcmd
-  setlocal bufhidden=delete
-  setlocal nobuflisted
-  setlocal nomodifiable
-  setlocal nowrap
-  setlocal nonumber
-  setlocal previewwindow
-  "setlocal statusline=%F\ %{TailMinusF_Monitor()}
-
-  call TailMinusF_SetCursor()
-endfunction
-
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" used by TailMinusF to refresh the window contents & position
-" use this instead of autoread for silent reloading and better control
-function! TailMinusF_Refresh()
-  if &previewwindow
-    " if the cursor is on the last line, we'll move it with the update
-    if line(".") != line("$")
-      let l:update_cursor = 0
-    else
-      let l:update_cursor = 1
-    endif
-
-    " do all the necessary updates
-    silent execute "edit!"
-    if l:update_cursor
-      call TailMinusF_SetCursor()
-    endif
-  else
-    " jump to the preview window to reload
-    wincmd P
-
-    " do all the necessary updates
-    silent execute "edit!"
-    call TailMinusF_SetCursor()
-
-    " jump back
-    wincmd p
-  endif
-endfunction
-
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" used by TailMinusF to set the cursor position in the preview window
-" assumes that the correct window has already been selected
-function! TailMinusF_SetCursor()
-  normal G
-  if g:TailMinusF_Center_Win
-    normal zz
-  endif
-endfunction
-
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" used by TailMinusF to stop watching the file and clean up
-function! TailMinusF_Stop()
-  autocmd! TailMinusF
-  augroup! TailMinusF
-endfunction

File .vim/bundle/a.vim/plugin/a.vim

-" Copyright (c) 1998-2006
-" Michael Sharpe <feline@irendi.com>
-"
-" We grant permission to use, copy modify, distribute, and sell this
-" software for any purpose without fee, provided that the above copyright
-" notice and this text are not removed. We make no guarantee about the
-" suitability of this software for any purpose and we are not liable
-" for any damages resulting from its use. Further, we are under no
-" obligation to maintain or extend this software. It is provided on an
-" "as is" basis without any expressed or implied warranty.
-
-" Directory & regex enhancements added by Bindu Wavell who is well known on
-" vim.sf.net
-"
-" Patch for spaces in files/directories from Nathan Stien (also reported by
-" Soeren Sonnenburg)
-
-" Do not load a.vim if is has already been loaded.
-if exists("loaded_alternateFile")
-    finish
-endif
-if (v:progname == "ex")
-   finish
-endif
-let loaded_alternateFile = 1
-
-let alternateExtensionsDict = {}
-
-" setup the default set of alternate extensions. The user can override in thier
-" .vimrc if the defaults are not suitable. To override in a .vimrc simply set a
-" g:alternateExtensions_<EXT> variable to a comma separated list of alternates,
-" where <EXT> is the extension to map.
-" E.g. let g:alternateExtensions_CPP = "inc,h,H,HPP,hpp"
-"      let g:alternateExtensions_{'aspx.cs'} = "aspx"
-
-
-" This variable will be increased when an extension with greater number of dots
-" is added by the AddAlternateExtensionMapping call.
-let s:maxDotsInExtension = 1
-
-" Function : AddAlternateExtensionMapping (PRIVATE)
-" Purpose  : simple helper function to add the default alternate extension
-"            mappings.
-" Args     : extension -- the extension to map
-"            alternates -- comma separated list of alternates extensions
-" Returns  : nothing
-" Author   : Michael Sharpe <feline@irendi.com>
-function! <SID>AddAlternateExtensionMapping(extension, alternates)
-   " This code does not actually work for variables like foo{'a.b.c.d.e'}
-   "let varName = "g:alternateExtensions_" . a:extension
-   "if (!exists(varName))
-   "   let g:alternateExtensions_{a:extension} = a:alternates
-   "endif
-
-   " This code handles extensions which contains a dot. exists() fails with
-   " such names.
-   "let v:errmsg = ""
-   " FIXME this line causes ex to return 1 instead of 0 for some reason??
-   "silent! echo g:alternateExtensions_{a:extension}
-   "if (v:errmsg != "")
-      "let g:alternateExtensions_{a:extension} = a:alternates
-   "endif
-
-   let g:alternateExtensionsDict[a:extension] = a:alternates
-   let dotsNumber = strlen(substitute(a:extension, "[^.]", "", "g"))
-   if s:maxDotsInExtension < dotsNumber
-     let s:maxDotsInExtension = dotsNumber
-   endif
-endfunction
-
-
-" Add all the default extensions
-" Mappings for C and C++
-call <SID>AddAlternateExtensionMapping('h',"c,cpp,cxx,cc,CC")
-call <SID>AddAlternateExtensionMapping('H',"C,CPP,CXX,CC")
-call <SID>AddAlternateExtensionMapping('hpp',"cpp,c")
-call <SID>AddAlternateExtensionMapping('HPP',"CPP,C")
-call <SID>AddAlternateExtensionMapping('c',"h")
-call <SID>AddAlternateExtensionMapping('C',"H")
-call <SID>AddAlternateExtensionMapping('cpp',"h,hpp")
-call <SID>AddAlternateExtensionMapping('CPP',"H,HPP")
-call <SID>AddAlternateExtensionMapping('cc',"h")
-call <SID>AddAlternateExtensionMapping('CC',"H,h")
-call <SID>AddAlternateExtensionMapping('cxx',"h")
-call <SID>AddAlternateExtensionMapping('CXX',"H")
-" Mappings for PSL7
-call <SID>AddAlternateExtensionMapping('psl',"ph")
-call <SID>AddAlternateExtensionMapping('ph',"psl")
-" Mappings for ADA
-call <SID>AddAlternateExtensionMapping('adb',"ads")
-call <SID>AddAlternateExtensionMapping('ads',"adb")
-" Mappings for lex and yacc files
-call <SID>AddAlternateExtensionMapping('l',"y,yacc,ypp")
-call <SID>AddAlternateExtensionMapping('lex',"yacc,y,ypp")
-call <SID>AddAlternateExtensionMapping('lpp',"ypp,y,yacc")
-call <SID>AddAlternateExtensionMapping('y',"l,lex,lpp")
-call <SID>AddAlternateExtensionMapping('yacc',"lex,l,lpp")
-call <SID>AddAlternateExtensionMapping('ypp',"lpp,l,lex")
-" Mappings for OCaml
-call <SID>AddAlternateExtensionMapping('ml',"mli")
-call <SID>AddAlternateExtensionMapping('mli',"ml")
-" ASP stuff
-call <SID>AddAlternateExtensionMapping('aspx.cs', 'aspx')
-call <SID>AddAlternateExtensionMapping('aspx.vb', 'aspx')
-call <SID>AddAlternateExtensionMapping('aspx', 'aspx.cs,aspx.vb')
-
-" Setup default search path, unless the user has specified
-" a path in their [._]vimrc. 
-if (!exists('g:alternateSearchPath'))
-  let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,sfr:../inc'
-endif
-
-" If this variable is true then a.vim will not alternate to a file/buffer which
-" does not exist. E.g while editing a.c and the :A will not swtich to a.h
-" unless it exists.
-if (!exists('g:alternateNoDefaultAlternate'))
-   " by default a.vim will alternate to a file which does not exist
-   let g:alternateNoDefaultAlternate = 0
-endif
-
-" If this variable is true then a.vim will convert the alternate filename to a
-" filename relative to the current working directory.
-" Feature by Nathan Huizinga
-if (!exists('g:alternateRelativeFiles'))                                        
-   " by default a.vim will not convert the filename to one relative to the
-   " current working directory
-   let g:alternateRelativeFiles = 0
-endif
-
-
-" Function : GetNthItemFromList (PRIVATE)
-" Purpose  : Support reading items from a comma seperated list
-"            Used to iterate all the extensions in an extension spec
-"            Used to iterate all path prefixes
-" Args     : list -- the list (extension spec, file paths) to iterate
-"            n -- the extension to get
-" Returns  : the nth item (extension, path) from the list (extension 
-"            spec), or "" for failure
-" Author   : Michael Sharpe <feline@irendi.com>
-" History  : Renamed from GetNthExtensionFromSpec to GetNthItemFromList
-"            to reflect a more generic use of this function. -- Bindu
-function! <SID>GetNthItemFromList(list, n) 
-   let itemStart = 0
-   let itemEnd = -1
-   let pos = 0
-   let item = ""
-   let i = 0
-   while (i != a:n)
-      let itemStart = itemEnd + 1
-      let itemEnd = match(a:list, ",", itemStart)
-      let i = i + 1
-      if (itemEnd == -1)
-         if (i == a:n)
-            let itemEnd = strlen(a:list)
-         endif
-         break
-      endif
-   endwhile 
-   if (itemEnd != -1) 
-      let item = strpart(a:list, itemStart, itemEnd - itemStart)
-   endif
-   return item 
-endfunction
-
-" Function : ExpandAlternatePath (PRIVATE)
-" Purpose  : Expand path info.  A path with a prefix of "wdr:" will be 
-"            treated as relative to the working directory (i.e. the 
-"            directory where vim was started.) A path prefix of "abs:" will 
-"            be treated as absolute. No prefix or "sfr:" will result in the 
-"            path being treated as relative to the source file (see sfPath 
-"            argument). 
-"
-"            A prefix of "reg:" will treat the pathSpec as a regular
-"            expression substitution that is applied to the source file 
-"            path. The format is:
-"
-"              reg:<sep><pattern><sep><subst><sep><flag><sep>
-"          
-"            <sep> seperator character, we often use one of [/|%#] 
-"            <pattern> is what you are looking for
-"            <subst> is the output pattern
-"            <flag> can be g for global replace or empty
-"
-"            EXAMPLE: 'reg:/inc/src/g/' will replace every instance 
-"            of 'inc' with 'src' in the source file path. It is possible
-"            to use match variables so you could do something like:
-"            'reg:|src/\([^/]*\)|inc/\1||' (see 'help :substitute', 
-"            'help pattern' and 'help sub-replace-special' for more details
-"
-"            NOTE: a.vim uses ',' (comma) internally so DON'T use it
-"            in your regular expressions or other pathSpecs unless you update 
-"            the rest of the a.vim code to use some other seperator.
-"
-" Args     : pathSpec -- path component (or substitution patterns)
-"            sfPath -- source file path
-" Returns  : a path that can be used by AlternateFile()
-" Author   : Bindu Wavell <bindu@wavell.net>
-function! <SID>ExpandAlternatePath(pathSpec, sfPath) 
-   let prfx = strpart(a:pathSpec, 0, 4)
-   if (prfx == "wdr:" || prfx == "abs:")
-      let path = strpart(a:pathSpec, 4)
-   elseif (prfx == "reg:")
-      let re = strpart(a:pathSpec, 4)
-      let sep = strpart(re, 0, 1)
-      let patend = match(re, sep, 1)
-      let pat = strpart(re, 1, patend - 1)
-      let subend = match(re, sep, patend + 1)
-      let sub = strpart(re, patend+1, subend - patend - 1)
-      let flag = strpart(re, strlen(re) - 2)
-      if (flag == sep)
-        let flag = ''
-      endif
-      let path = substitute(a:sfPath, pat, sub, flag)
-      "call confirm('PAT: [' . pat . '] SUB: [' . sub . ']')
-      "call confirm(a:sfPath . ' => ' . path)
-   else
-      let path = a:pathSpec
-      if (prfx == "sfr:")
-         let path = strpart(path, 4)
-      endif
-      let path = a:sfPath . "/" . path
-   endif
-   return path
-endfunction
-
-" Function : FindFileInSearchPath (PRIVATE)
-" Purpose  : Searches for a file in the search path list
-" Args     : filename -- name of the file to search for
-"            pathList -- the path list to search
-"            relPathBase -- the path which relative paths are expanded from
-" Returns  : An expanded filename if found, the empty string otherwise
-" Author   : Michael Sharpe (feline@irendi.com)
-" History  : inline code written by Bindu Wavell originally
-function! <SID>FindFileInSearchPath(fileName, pathList, relPathBase)
-   let filepath = ""
-   let m = 1
-   let pathListLen = strlen(a:pathList)
-   if (pathListLen > 0)
-      while (1)
-         let pathSpec = <SID>GetNthItemFromList(a:pathList, m) 
-         if (pathSpec != "")
-            let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
-            let fullname = path . "/" . a:fileName
-            let foundMatch = <SID>BufferOrFileExists(fullname)
-            if (foundMatch)
-               let filepath = fullname
-               break
-            endif
-         else
-            break
-         endif
-         let m = m + 1
-      endwhile
-   endif
-   return filepath
-endfunction
-
-" Function : FindFileInSearchPathEx (PRIVATE)
-" Purpose  : Searches for a file in the search path list
-" Args     : filename -- name of the file to search for
-"            pathList -- the path list to search
-"            relPathBase -- the path which relative paths are expanded from
-"            count -- find the count'th occurence of the file on the path
-" Returns  : An expanded filename if found, the empty string otherwise
-" Author   : Michael Sharpe (feline@irendi.com)
-" History  : Based on <SID>FindFileInSearchPath() but with extensions
-function! <SID>FindFileInSearchPathEx(fileName, pathList, relPathBase, count)
-   let filepath = ""
-   let m = 1
-   let spath = ""
-   let pathListLen = strlen(a:pathList)
-   if (pathListLen > 0)
-      while (1)
-         let pathSpec = <SID>GetNthItemFromList(a:pathList, m) 
-         if (pathSpec != "")
-            let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
-            if (spath != "")
-               let spath = spath . ','
-            endif
-            let spath = spath . path
-         else
-            break
-         endif
-         let m = m + 1
-      endwhile
-   endif
-
-   if (&path != "")
-      if (spath != "")
-         let spath = spath . ','
-      endif
-      let spath = spath . &path
-   endif
-
-   let filepath = findfile(a:fileName, spath, a:count)
-   return filepath
-endfunction
-
-" Function : EnumerateFilesByExtension (PRIVATE)
-" Purpose  : enumerates all files by a particular list of alternate extensions.
-" Args     : path -- path of a file (not including the file)
-"            baseName -- base name of the file to be expanded
-"            extension -- extension whose alternates are to be enumerated
-" Returns  : comma separated list of files with extensions
-" Author   : Michael Sharpe <feline@irendi.com>
-function! EnumerateFilesByExtension(path, baseName, extension)
-   let enumeration = ""
-   let extSpec = ""
-   let v:errmsg = ""
-   silent! echo g:alternateExtensions_{a:extension}
-   if (v:errmsg == "")
-      let extSpec = g:alternateExtensions_{a:extension}
-   endif
-   if (extSpec == "")
-      if (has_key(g:alternateExtensionsDict, a:extension))
-         let extSpec = g:alternateExtensionsDict[a:extension]
-      endif
-   endif
-   if (extSpec != "") 
-      let n = 1
-      let done = 0
-      while (!done)
-         let ext = <SID>GetNthItemFromList(extSpec, n)
-         if (ext != "")
-            if (a:path != "")
-               let newFilename = a:path . "/" . a:baseName . "." . ext
-            else
-               let newFilename =  a:baseName . "." . ext
-            endif
-            if (enumeration == "")
-               let enumeration = newFilename
-            else
-               let enumeration = enumeration . "," . newFilename
-            endif
-         else
-            let done = 1
-         endif
-         let n = n + 1
-      endwhile
-   endif
-   return enumeration
-endfunction
-
-" Function : EnumerateFilesByExtensionInPath (PRIVATE)
-" Purpose  : enumerates all files by expanding the path list and the extension
-"            list.
-" Args     : baseName -- base name of the file
-"            extension -- extension whose alternates are to be enumerated
-"            pathList -- the list of paths to enumerate
-"            relPath -- the path of the current file for expansion of relative
-"                       paths in the path list.
-" Returns  : A comma separated list of paths with extensions
-" Author   : Michael Sharpe <feline@irendi.com>
-function! EnumerateFilesByExtensionInPath(baseName, extension, pathList, relPathBase)
-   let enumeration = ""
-   let filepath = ""
-   let m = 1
-   let pathListLen = strlen(a:pathList)
-   if (pathListLen > 0)
-      while (1)
-         let pathSpec = <SID>GetNthItemFromList(a:pathList, m) 
-         if (pathSpec != "")
-            let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
-            let pe = EnumerateFilesByExtension(path, a:baseName, a:extension)
-            if (enumeration == "")
-               let enumeration = pe
-            else
-               let enumeration = enumeration . "," . pe
-            endif
-         else
-            break
-         endif
-         let m = m + 1
-      endwhile
-   endif
-   return enumeration
-endfunction
-
-" Function : DetermineExtension (PRIVATE)
-" Purpose  : Determines the extension of a filename based on the register
-"            alternate extension. This allow extension which contain dots to 
-"            be considered. E.g. foo.aspx.cs to foo.aspx where an alternate
-"            exists for the aspx.cs extension. Note that this will only accept
-"            extensions which contain less than 5 dots. This is only
-"            implemented in this manner for simplicity...it is doubtful that 
-"            this will be a restriction in non-contrived situations.
-" Args     : The path to the file to find the extension in
-" Returns  : The matched extension if any
-" Author   : Michael Sharpe (feline@irendi.com)
-" History  : idea from Tom-Erik Duestad
-" Notes    : there is some magic occuring here. The exists() function does not
-"            work well when the curly brace variable has dots in it. And why
-"            should it, dots are not valid in variable names. But the exists
-"            function is wierd too. Lets say foo_c does exist. Then
-"            exists("foo_c.e.f") will be true...even though the variable does 
-"            not exist. However the curly brace variables do work when the
-"            variable has dots in it. E.g foo_{'c'} is different from 
-"            foo_{'c.d.e'}...and foo_{'c'} is identical to foo_c and
-"            foo_{'c.d.e'} is identical to foo_c.d.e right? Yes in the current
-"            implementation of vim. To trick vim to test for existence of such
-"            variables echo the curly brace variable and look for an error 
-"            message.
-function! DetermineExtension(path) 
-  let mods = ":t"
-  let i = 0
-  while i <= s:maxDotsInExtension
-    let mods = mods . ":e"
-    let extension = fnamemodify(a:path, mods)
-    if (has_key(g:alternateExtensionsDict, extension))
-       return extension
-    endif
-    let v:errmsg = ""
-    silent! echo g:alternateExtensions_{extension}
-    if (v:errmsg == "")
-      return extension
-    endif
-    let i = i + 1
-  endwhile
-  return ""
-endfunction
-
-" Function : AlternateFile (PUBLIC)
-" Purpose  : Opens a new buffer by looking at the extension of the current
-"            buffer and finding the corresponding file. E.g. foo.c <--> foo.h
-" Args     : accepts one argument. If present it used the argument as the new
-"            extension.
-" Returns  : nothing
-" Author   : Michael Sharpe <feline@irendi.com>
-" History  : + When an alternate can't be found in the same directory as the
-"              source file, a search path will be traversed looking for the
-"              alternates.
-"            + Moved some code into a separate function, minor optimization
-"            + rework to favor files in memory based on complete enumeration of
-"              all files extensions and paths
-function! AlternateFile(splitWindow, ...)
-  let extension   = DetermineExtension(expand("%:p"))
-  let baseName    = substitute(expand("%:t"), "\." . extension . '$', "", "")
-  let currentPath = expand("%:p:h")
-
-  if (a:0 != 0)
-     let newFullname = currentPath . "/" .  baseName . "." . a:1
-     call <SID>FindOrCreateBuffer(newFullname, a:splitWindow, 0)
-  else
-     let allfiles = ""
-     if (extension != "")
-        let allfiles1 = EnumerateFilesByExtension(currentPath, baseName, extension)
-        let allfiles2 = EnumerateFilesByExtensionInPath(baseName, extension, g:alternateSearchPath, currentPath)
-
-        if (allfiles1 != "")
-           if (allfiles2 != "")
-              let allfiles = allfiles1 . ',' . allfiles2
-           else
-              let allfiles = allfiles1
-           endif
-        else 
-           let allfiles = allfiles2
-        endif
-     endif
-
-     if (allfiles != "") 
-        let bestFile = ""
-        let bestScore = 0
-        let score = 0
-        let n = 1
-         
-        let onefile = <SID>GetNthItemFromList(allfiles, n)
-        let bestFile = onefile
-        while (onefile != "" && score < 2)
-           let score = <SID>BufferOrFileExists(onefile)
-           if (score > bestScore)
-              let bestScore = score
-              let bestFile = onefile
-           endif
-           let n = n + 1
-           let onefile = <SID>GetNthItemFromList(allfiles, n)
-        endwhile
-
-        if (bestScore == 0 && g:alternateNoDefaultAlternate == 1)
-           echo "No existing alternate available"
-        else
-           call <SID>FindOrCreateBuffer(bestFile, a:splitWindow, 1)
-           let b:AlternateAllFiles = allfiles
-        endif
-     else
-        echo "No alternate file/buffer available"
-     endif
-   endif
-endfunction
-
-" Function : AlternateOpenFileUnderCursor (PUBLIC)
-" Purpose  : Opens file under the cursor
-" Args     : splitWindow -- indicates how to open the file
-" Returns  : Nothing
-" Author   : Michael Sharpe (feline@irendi.com) www.irendi.com
-function! AlternateOpenFileUnderCursor(splitWindow,...)
-   let cursorFile = (a:0 > 0) ? a:1 : expand("<cfile>") 
-   let currentPath = expand("%:p:h")
-   let openCount = 1
-
-   let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
-   if (fileName != "")
-      call <SID>FindOrCreateBuffer(fileName, a:splitWindow, 1)
-      let b:openCount = openCount
-      let b:cursorFile = cursorFile
-      let b:currentPath = currentPath
-   else
-      echo "Can't find file"
-   endif
-endfunction
-
-" Function : AlternateOpenNextFile (PUBLIC)
-" Purpose  : Opens the next file corresponding to the search which found the 
-"            current file
-" Args     : bang -- indicates what to do if the current file has not been 
-"                    saved
-" Returns  : nothing
-" Author   : Michael Sharpe (feline@irendi.com) www.irendi.com
-function! AlternateOpenNextFile(bang)
-   let cursorFile = ""
-   if (exists("b:cursorFile"))
-      let cursorFile = b:cursorFile
-   endif
-
-   let currentPath = ""
-   if (exists("b:currentPath"))
-      let currentPath = b:currentPath
-   endif
-
-   let openCount = 0
-   if (exists("b:openCount"))
-      let openCount = b:openCount + 1
-   endif
-
-   if (cursorFile != ""  && currentPath != ""  && openCount != 0)
-      let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
-      if (fileName != "")
-         call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
-         let b:openCount = openCount
-         let b:cursorFile = cursorFile
-         let b:currentPath = currentPath
-      else 
-         let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, 1)
-         if (fileName != "")
-            call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
-            let b:openCount = 1
-            let b:cursorFile = cursorFile
-            let b:currentPath = currentPath
-         else
-            echo "Can't find next file"
-         endif
-      endif
-   endif
-endfunction
-
-comm! -nargs=? -bang IH call AlternateOpenFileUnderCursor("n<bang>", <f-args>)
-comm! -nargs=? -bang IHS call AlternateOpenFileUnderCursor("h<bang>", <f-args>)
-comm! -nargs=? -bang IHV call AlternateOpenFileUnderCursor("v<bang>", <f-args>)
-comm! -nargs=? -bang IHT call AlternateOpenFileUnderCursor("t<bang>", <f-args>)
-comm! -nargs=? -bang IHN call AlternateOpenNextFile("<bang>")
-imap <Leader>ih <ESC>:IHS<CR>
-nmap <Leader>ih :IHS<CR>
-imap <Leader>is <ESC>:IHS<CR>:A<CR>
-nmap <Leader>is :IHS<CR>:A<CR>
-imap <Leader>ihn <ESC>:IHN<CR>
-nmap <Leader>ihn :IHN<CR>
-
-"function! <SID>PrintList(theList) 
-"   let n = 1
-"   let oneFile = <SID>GetNthItemFromList(a:theList, n)
-"   while (oneFile != "")
-"      let n = n + 1
-"      let oneFile = <SID>GetNthItemFromList(a:theList, n)
-"   endwhile
-"endfunction
-
-" Function : NextAlternate (PUBLIC)
-" Purpose  : Used to cycle through any other alternate file which existed on
-"            the search path.
-" Args     : bang (IN) - used to implement the AN vs AN! functionality
-" Returns  : nothing
-" Author   : Michael Sharpe <feline@irendi.com>
-function! NextAlternate(bang)
-   if (exists('b:AlternateAllFiles'))
-      let currentFile = expand("%")
-      let n = 1
-      let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
-      while (onefile != "" && !<SID>EqualFilePaths(fnamemodify(onefile,":p"), fnamemodify(currentFile,":p")))
-         let n = n + 1
-         let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
-      endwhile
-
-      if (onefile != "")
-         let stop = n
-         let n = n + 1
-         let foundAlternate = 0
-         let nextAlternate = ""
-         while (n != stop)
-            let nextAlternate = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
-            if (nextAlternate == "")
-               let n = 1
-               continue
-            endif
-            let n = n + 1
-            if (<SID>EqualFilePaths(fnamemodify(nextAlternate, ":p"), fnamemodify(currentFile, ":p")))
-                continue
-            endif
-            if (filereadable(nextAlternate))
-                " on cygwin filereadable("foo.H") returns true if "foo.h" exists
-               if (has("unix") && $WINDIR != "" && fnamemodify(nextAlternate, ":p") ==? fnamemodify(currentFile, ":p")) 
-                  continue
-               endif
-               let foundAlternate = 1
-               break
-            endif
-         endwhile
-         if (foundAlternate == 1)
-            let s:AlternateAllFiles = b:AlternateAllFiles
-            "silent! execute ":e".a:bang." " . nextAlternate
-            call <SID>FindOrCreateBuffer(nextAlternate, "n".a:bang, 0)
-            let b:AlternateAllFiles = s:AlternateAllFiles
-         else 
-            echo "Only this alternate file exists"
-         endif
-      else 
-         echo "Could not find current file in alternates list"
-      endif
-   else 
-      echo "No other alternate files exist"
-   endif
-endfunction
-
-comm! -nargs=? -bang A call AlternateFile("n<bang>", <f-args>)
-comm! -nargs=? -bang AS call AlternateFile("h<bang>", <f-args>)
-comm! -nargs=? -bang AV call AlternateFile("v<bang>", <f-args>)
-comm! -nargs=? -bang AT call AlternateFile("t<bang>", <f-args>)
-comm! -nargs=? -bang AN call NextAlternate("<bang>")
-
-" Function : BufferOrFileExists (PRIVATE)
-" Purpose  : determines if a buffer or a readable file exists
-" Args     : fileName (IN) - name of the file to check
-" Returns  : 2 if it exists in memory, 1 if it exists, 0 otherwise
-" Author   : Michael Sharpe <feline@irendi.com>
-" History  : Updated code to handle buffernames using just the
-"            filename and not the path.
-function! <SID>BufferOrFileExists(fileName)
-   let result = 0
-
-   let lastBuffer = bufnr("$")
-   let i = 1
-   while i <= lastBuffer
-     if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
-       let result = 2
-       break
-     endif
-     let i = i + 1
-   endwhile
-
-   if (!result) 
-      let bufName = fnamemodify(a:fileName,":t")
-      let memBufName = bufname(bufName)
-      if (memBufName != "")
-         let memBufBasename = fnamemodify(memBufName, ":t")
-         if (bufName == memBufBasename)
-            let result = 2
-         endif
-      endif
-
-      if (!result)
-         let result  = bufexists(bufName) || bufexists(a:fileName) || filereadable(a:fileName)
-      endif
-   endif
-
-   if (!result)
-      let result = filereadable(a:fileName)
-   endif
-   return result
-endfunction
-
-" Function : FindOrCreateBuffer (PRIVATE)
-" Purpose  : searches the buffer list (:ls) for the specified filename. If
-"            found, checks the window list for the buffer. If the buffer is in
-"            an already open window, it switches to the window. If the buffer
-"            was not in a window, it switches to that buffer. If the buffer did
-"            not exist, it creates it.
-" Args     : filename (IN) -- the name of the file
-"            doSplit (IN) -- indicates whether the window should be split
-"                            ("v", "h", "n", "v!", "h!", "n!", "t", "t!") 
-"            findSimilar (IN) -- indicate weather existing buffers should be
-"                                prefered
-" Returns  : nothing
-" Author   : Michael Sharpe <feline@irendi.com>
-" History  : + bufname() was not working very well with the possibly strange
-"            paths that can abound with the search path so updated this
-"            slightly.  -- Bindu
-"            + updated window switching code to make it more efficient -- Bindu
-"            Allow ! to be applied to buffer/split/editing commands for more
-"            vim/vi like consistency
-"            + implemented fix from Matt Perry
-function! <SID>FindOrCreateBuffer(fileName, doSplit, findSimilar)
-  " Check to see if the buffer is already open before re-opening it.
-  let FILENAME = escape(a:fileName, ' ')
-  let bufNr = -1
-  let lastBuffer = bufnr("$")
-  let i = 1
-  if (a:findSimilar) 
-     while i <= lastBuffer
-       if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
-         let bufNr = i
-         break
-       endif
-       let i = i + 1
-     endwhile
-
-     if (bufNr == -1)
-        let bufName = bufname(a:fileName)
-        let bufFilename = fnamemodify(a:fileName,":t")
-
-        if (bufName == "")
-           let bufName = bufname(bufFilename)
-        endif
-
-        if (bufName != "")
-           let tail = fnamemodify(bufName, ":t")
-           if (tail != bufFilename)
-              let bufName = ""
-           endif
-        endif
-        if (bufName != "")
-           let bufNr = bufnr(bufName)
-           let FILENAME = bufName
-        endif
-     endif
-  endif
-
-  if (g:alternateRelativeFiles == 1)                                            
-        let FILENAME = fnamemodify(FILENAME, ":p:.")
-  endif
-
-  let splitType = a:doSplit[0]
-  let bang = a:doSplit[1]
-  if (bufNr == -1)
-     " Buffer did not exist....create it
-     let v:errmsg=""
-     if (splitType == "h")
-        silent! execute ":split".bang." " . FILENAME
-     elseif (splitType == "v")
-        silent! execute ":vsplit".bang." " . FILENAME
-     elseif (splitType == "t")
-        silent! execute ":tab split".bang." " . FILENAME
-     else
-        silent! execute ":e".bang." " . FILENAME
-     endif
-     if (v:errmsg != "")
-        echo v:errmsg
-     endif
-  else
-
-     " Find the correct tab corresponding to the existing buffer
-     let tabNr = -1
-     " iterate tab pages
-     for i in range(tabpagenr('$'))
-        " get the list of buffers in the tab
-        let tabList =  tabpagebuflist(i + 1)
-        let idx = 0
-        " iterate each buffer in the list
-        while idx < len(tabList)
-           " if it matches the buffer we are looking for...
-           if (tabList[idx] == bufNr)
-              " ... save the number
-              let tabNr = i + 1
-              break
-           endif
-           let idx = idx + 1
-        endwhile
-        if (tabNr != -1)
-           break
-        endif
-     endfor
-     " switch the the tab containing the buffer
-     if (tabNr != -1)
-        execute "tabn ".tabNr
-     endif
-
-     " Buffer was already open......check to see if it is in a window
-     let bufWindow = bufwinnr(bufNr)
-     if (bufWindow == -1) 
-        " Buffer was not in a window so open one
-        let v:errmsg=""
-        if (splitType == "h")
-           silent! execute ":sbuffer".bang." " . FILENAME
-        elseif (splitType == "v")
-           silent! execute ":vert sbuffer " . FILENAME
-        elseif (splitType == "t")
-           silent! execute ":tab sbuffer " . FILENAME
-        else
-           silent! execute ":buffer".bang." " . FILENAME
-        endif
-        if (v:errmsg != "")
-           echo v:errmsg
-        endif
-     else
-        " Buffer is already in a window so switch to the window
-        execute bufWindow."wincmd w"
-        if (bufWindow != winnr()) 
-           " something wierd happened...open the buffer
-           let v:errmsg=""
-           if (splitType == "h")
-              silent! execute ":split".bang." " . FILENAME
-           elseif (splitType == "v")
-              silent! execute ":vsplit".bang." " . FILENAME
-           elseif (splitType == "t")
-              silent! execute ":tab split".bang." " . FILENAME
-           else
-              silent! execute ":e".bang." " . FILENAME
-           endif
-           if (v:errmsg != "")
-              echo v:errmsg
-           endif
-        endif
-     endif
-  endif
-endfunction
-
-" Function : EqualFilePaths (PRIVATE)
-" Purpose  : Compares two paths. Do simple string comparison anywhere but on
-"            Windows. On Windows take into account that file paths could differ
-"            in usage of separators and the fact that case does not matter.
-"            "c:\WINDOWS" is the same path as "c:/windows". has("win32unix") Vim
-"            version does not count as one having Windows path rules.
-" Args     : path1 (IN) -- first path
-"            path2 (IN) -- second path
-" Returns  : 1 if path1 is equal to path2, 0 otherwise.
-" Author   : Ilya Bobir <ilya@po4ta.com>
-function! <SID>EqualFilePaths(path1, path2)
-  if has("win16") || has("win32") || has("win64") || has("win95")
-    return substitute(a:path1, "\/", "\\", "g") ==? substitute(a:path2, "\/", "\\", "g")
-  else
-    return a:path1 == a:path2
-  endif
-endfunction

File .vim/bundle/dbext.vim/README

-This is a mirror of http://www.vim.org/scripts/script.php?script_id=356
-
-This plugin contains functions/mappings/commands to enable Vim to access several databases. Current databases supported are: Mysql, PostgreSQL, Ingres, Oracle, Oracle Rdb (VMS), Sybase Adaptive Server Anywhere, Sybase Adaptive Server Enterprise, Microsoft SQL Server, DB2, Interbase and SQLite and ODBC are supported.  New to version 5.x of dbext introduces the support for Perl's DBI layer.  If the database you are using is not *natively* supported by dbext, but has a DBI interface, dbext's standard feature set is available.  For those already using dbext, the DBI interface should provide a performance boost when running statements against your database.  DBI also provides an ODBC bridge, therefore any ODBC compliant database is also accessible.
-
-NOTE: As of version 4.0 this plugin requires Vim 7.
-Version 5.0 supports Vim 7's autoload feature.
-
-dbext provides a common interface between your editor and a database.  If your company/project moves onto a new database platform, there is no need to learn the new databases tools.  While editing your SQL (and without leaving Vim) you can execute database commands, run queries, display results, and view database objects.  dbext understands various programming languages, and can parse and prompt the user for [host] variables and execute the resulting statement.  See below for more details.
-
-Adds a menu for the common commands for gvim users.
-
-Some of the features that are supported:
-
-Tutorial
------------
-A tutorial has been added to help you become familiar with the features of the plugin, :h dbext-tutorial.
-If you dislike reading docs, then at a minimum follow the tutorial.  It will give you the basics of the features and introduce some "best" practices, like creating connection profiles.
-
-Connection Profiles
------------------------------
-You can create as many profiles as you like in your vimrc.  Each profile specifies various connection information.  Each buffer can be connected to a different database.   The plugin will automatically prompt the user for connection information.  If you have defined profiles in your vimrc, for ease of use,  you can choose from a numbered list.
-
-SQL History
------------
-As of version 3.0, dbext maintains a history file which is shared between multiple instances of Vim.  A statement added in one instance of Vim will be immediately available in a different instance of Vim on the same computer.  To re-run a statement you can either press <enter> on the line, or if you prefer the mouse you can double click on the statement.
-
-Modeline Support
----------------------------
-Similar to Vim modelines, you can specify connection information as comments within your buffers.  To prevent sensitive information (i.e. passwords) from being visible, you can specify a connection profile as part of your modeline.  
-
-Object Completion
-----------------------------
-dbext ties into Vim dictionary feature.  You can complete table names, procedure names and view names using the i_CTRL-X_CTRL-K feature.
-
-Viewing Lists of Objects
-------------------------------------
-You can browse through the various objects in the database you are connected to and specify wildcard information.  For example you can say, "Show me all tables beginning with 'ml_' ".  These objects are currently supported: Tables, Procedures, Views,  Columns (for a table).
-
-Result Buffer
--------------------
-The output from any of the commands is placed into a new buffer called Result.  In the event of an error, both the error and the command line is included for inspection.
-
-Mappings
-----------------
-There are many maps created for convenience.  They exist for most modes (command, visual and insert).
-
-Place the cursor on a word, and invoke the default mapping (or menu) and a Result buffer will open with the contents of the table displayed (i.e. select * from <word>.  Optionally you can be prompted for the table name, and a WHERE clause.
-
-Describe a table (see column names and datatypes).
-
-Describe a stored procedure (see input and output datatypes).
-
-Visually highlight statements and execute them against the database.
-
-Parsing Statements
------------------------------
-By default any statement will be parsed looking for input parameters (host variables), if any are found you are prompted to enter a suitable value for the parameter.  This option can be turned off either globally or on a per
-buffer basis.
-        SELECT first_name, city
-          FROM customer
-         WHERE last_name    = @name
-In the case you will be asked for a value for @name.  The rules for defining input parameters are customizable either globally or on a per buffer basis. See help file for more details.
-
-FileType Support
---------------------------
-SQL can be used from a variety of languages.  Each development language (PHP, Perl, Java, ...) language has different syntax for creating SQL statements that are sent to the database.  dbext has support for several
-different filetypes, so that it can understand and correctly parse a SQL statement.
-
-The current supported languages are:
-        PHP, Java, JSP, JavaScript, JProperties, Perl, SQL, Vim
-
-For example assume you had the following Java code:
-String mySQL = 
-    "SELECT s.script, ts.event, t.name                  " +
-    "     , s.script_language, sv.name                  " +
-    "  FROM ml_script s, ml_table_script ts, ml_table t " +
-                "     , ml_script_version sv                        " +
-    " WHERE s.script_id   = " + script_version +
-    "   AND ts.version_id = "+obj.method() +
-    "   AND ts.table_id   = t.table_id                  ";
-
-If you visually select from the "SELECT ... to the "; and ran 
- :'<,'>DBExecSQL    (or used the default map <Leader>se)
-
-The Java filetype support would concatenate each individual string into one
-single string.  In this case it removed the " + " and concatenated  the
-lines to result in the following (assuming this is on one line): 
-       SELECT s.script, ts.event, t.name , s.script_language, sv.name
-       FROM ml_script s, ml_table_script ts, ml_table t 
-                  , ml_script_version sv
-      WHERE s.script_id   = " + script_version + "
-        AND ts.version_id = "+obj.method() +"
-        AND ts.table_id   = t.table_id 
-
-Next, it will prompt you for replacement values for the various variables or  objects you used in the string.
-Assuming you had the default behaviour turned on, you would be prompted  to supply a value for: 
-                " + script_version + "
-                "+obj.method() +"
-
-So assuming you entered: 
-                100
-                'Project_Yahoo'
-
-Then the resulting string sent to your database would be (again, this would technically be on one line): 
-       SELECT s.script, ts.event, t.name , s.script_language, sv.name
-       FROM ml_script s, ml_table_script ts, ml_table t 
-                  , ml_script_version sv
-      WHERE s.script_id   = 100
-        AND ts.version_id = 'Project_Yahoo'
-        AND ts.table_id   = t.table_id 
-
-Benefit:  
-You did not have to test your SQL by cutting and pasting it into a separate tool and replacing all the object and host variables yourself.  Just by visually selecting the string and running the command DBExecSQL (or the default mapping <Leader>se) the SQL statement was executed against the database and allowed to you enter host variables.
-
-Additional Commands
----------------------------------
-DBExecSQL - Enter any command you want sent to the database
-DBExecRangeSQL - Enter any range of statements you want executed
-Select  - Enter the remainder of a select (ie :Select * from customer)
-Call  - Call a stored procedure
-Update  - Enter the remainder of an update
-Insert  - Enter the remainder of an insert
-Delete  - Enter the remainder of an delete
-Drop    - Enter the remainder of a drop
-Alter   - Enter the remainder of an alter
-Create  - Enter the remainder of a create

File .vim/bundle/dbext.vim/autoload/dbext.vim

-" dbext.vim - Commn Database Utility
-" Copyright (C) 2002-7, Peter Bagyinszki, David Fishburn
-" ---------------------------------------------------------------
-" Version:       12.00
-" Maintainer:    David Fishburn <dfishburn dot vim at gmail dot com>
-" Authors:       Peter Bagyinszki <petike1 at dpg dot hu>
-"                David Fishburn <dfishburn dot vim at gmail dot com>
-" Last Modified: 2010 Jul 15
-" Based On:      sqlplus.vim (author: Jamis Buck)
-" Created:       2002-05-24
-" Homepage:      http://vim.sourceforge.net/script.php?script_id=356
-" Contributors:  Joerg Schoppet 
-"                Hari Krishna Dara 
-"                Ron Aaron
-"                Andi Stern
-"                Sergey Khorev
-"
-" Help:         :h dbext.txt 
-"
-" This program is free software; you can redistribute it and/or modify
-" it under the terms of the GNU General Public License as published by
-" the Free Software Foundation; either version 2 of the License, or
-" (at your option) any later version.
-"
-" This program is distributed in the hope that it will be useful,
-" but WITHOUT ANY WARRANTY; without even the implied warranty of
-" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-" GNU General Public License for more details.
-"
-" You should have received a copy of the GNU General Public License
-" along with this program; if not, write to the Free Software
-" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-if exists('g:loaded_dbext_auto') || &cp
-    finish
-endif
-if v:version < 700
-    echomsg "dbext: Version 4.00 or higher requires Vim7.  Version 3.50 can stil be used with Vim6."
-    finish
-endif
-let g:loaded_dbext_auto = 1200
-
-" call confirm("Loaded dbext autoload", "&Ok")
-" Script variable defaults, these are used internal and are never displayed
-" to the end user via the DBGetOption command  {{{
-" let s:dbext_buffers_with_dict_files = ''
-let s:dbext_buffers_with_dict_files = []
-" +shellslash is set on windows so it can be used to decide
-" what type of slash to use
-let s:dbext_tempfile = fnamemodify(tempname(), ":h").
-            \ ((has('win32') && ! exists('+shellslash'))?'\':(has('vms')?'':'/')).
-            \ 'dbext.sql'
-let s:dbext_prev_sql     = ''
-let s:dbext_result_count = 0
-" Store previous buffer information so we can return to it when we 
-" " Store previous buffer information so we can return to it when we 
-" close the Result window
-" close the Result window
-let s:dbext_buffer_last_winnr = -1
-let s:dbext_buffer_last       = -1
-" }}}
-
-" Build internal lists {{{
-function! s:DB_buildLists()
-    " Available DB types - maintainer in ()
-    let s:db_types_mv = []
-    " Sybase Adaptive Server Anywhere (fishburn)
-    call add(s:db_types_mv, 'ASA')
-    " Sybase Adaptive Server Enterprise (fishburn)
-    call add(s:db_types_mv, 'ASE')
-    " DB2 (fishburn)
-    call add(s:db_types_mv, 'DB2')
-    " Ingres (schoppet)
-    call add(s:db_types_mv, 'INGRES')
-    " Interbase (bagyinszki)
-    call add(s:db_types_mv, 'INTERBASE')
-    " MySQL (fishburn)
-    call add(s:db_types_mv, 'MYSQL')
-    " Oracle (fishburn)
-    call add(s:db_types_mv, 'ORA')
-    " PostgreSQL (fishburn)
-    call add(s:db_types_mv, 'PGSQL')
-    " Microsoft Sql Server (fishburn)
-    call add(s:db_types_mv, 'SQLSRV')
-    " SQLite (fishburn)
-    call add(s:db_types_mv, 'SQLITE')
-    " Oracle Rdb (stern)
-    call add(s:db_types_mv, 'RDB')
-    " Sybase SQL Anywhere UltraLite (fishburn)
-    call add(s:db_types_mv, 'ULTRALITE')
-    " Firebird (fishburn)
-    call add(s:db_types_mv, 'FIREBIRD')
-
-    " The following are only available with the
-    " Perl DBI extension plug.
-    " It requires a Perl enabled Vim  (ie echo has('perl')  )
-    " Perl DBI (fishburn)
-    call add(s:db_types_mv, 'DBI')
-    " Perl DBI::ODBC (fishburn)
-    call add(s:db_types_mv, 'ODBC')
-
-    " Integrated Login Supported DB types
-    let s:intlogin_types_mv = []
-    "sybase adaptive server anywhere (fishburn)
-    call add(s:intlogin_types_mv, 'ASA')
-    "microsoft sql server (fishburn)
-    call add(s:intlogin_types_mv, 'SQLSRV')
-
-    " Connection parameters
-    let s:conn_params_mv = []
-    call add(s:conn_params_mv, 'profile')
-    call add(s:conn_params_mv, 'type')
-    call add(s:conn_params_mv, 'integratedlogin')
-    call add(s:conn_params_mv, 'user')
-    call add(s:conn_params_mv, 'passwd')
-    call add(s:conn_params_mv, 'dsnname')
-    call add(s:conn_params_mv, 'srvname')
-    call add(s:conn_params_mv, 'dbname')
-    call add(s:conn_params_mv, 'host')
-    call add(s:conn_params_mv, 'port')
-    call add(s:conn_params_mv, 'extra')
-    call add(s:conn_params_mv, 'bin_path')
-    call add(s:conn_params_mv, 'login_script')
-    call add(s:conn_params_mv, 'driver')
-    call add(s:conn_params_mv, 'conn_parms')
-    call add(s:conn_params_mv, 'driver_parms')
-
-    " Saved connection parameters
-    let s:saved_conn_params_mv = []
-    call add(s:saved_conn_params_mv, 'saved_profile')
-    call add(s:saved_conn_params_mv, 'saved_type')
-    call add(s:saved_conn_params_mv, 'saved_integratedlogin')
-    call add(s:saved_conn_params_mv, 'saved_user')
-    call add(s:saved_conn_params_mv, 'saved_passwd')
-    call add(s:saved_conn_params_mv, 'saved_dsnname')
-    call add(s:saved_conn_params_mv, 'saved_srvname')
-    call add(s:saved_conn_params_mv, 'saved_dbname')
-    call add(s:saved_conn_params_mv, 'saved_host')
-    call add(s:saved_conn_params_mv, 'saved_port')
-    call add(s:saved_conn_params_mv, 'saved_extra')
-    call add(s:saved_conn_params_mv, 'saved_bin_path')
-    call add(s:saved_conn_params_mv, 'saved_login_script')
-    call add(s:saved_conn_params_mv, 'saved_driver')
-    call add(s:saved_conn_params_mv, 'saved_conn_parms')
-    call add(s:saved_conn_params_mv, 'saved_driver_parms')
-
-    " Configuration parameters
-    let s:config_params_mv = []
-    call add(s:config_params_mv, 'use_sep_result_buffer')
-    call add(s:config_params_mv, 'query_statements')
-    call add(s:config_params_mv, 'parse_statements')
-    call add(s:config_params_mv, 'prompt_for_parameters')
-    call add(s:config_params_mv, 'prompting_user')
-    call add(s:config_params_mv, 'always_prompt_for_variables')
-    call add(s:config_params_mv, 'stop_prompt_for_variables')
-    call add(s:config_params_mv, 'use_saved_variables')
-    call add(s:config_params_mv, 'display_cmd_line')
-    call add(s:config_params_mv, 'variable_def')
-    call add(s:config_params_mv, 'variable_def_regex')
-    call add(s:config_params_mv, 'buffer_defaulted')
-    call add(s:config_params_mv, 'dict_show_owner')
-    call add(s:config_params_mv, 'dict_table_file')
-    call add(s:config_params_mv, 'dict_procedure_file')
-    call add(s:config_params_mv, 'dict_view_file')
-    call add(s:config_params_mv, 'replace_title')
-    call add(s:config_params_mv, 'custom_title')
-    call add(s:config_params_mv, 'use_tbl_alias')
-    call add(s:config_params_mv, 'delete_temp_file')
-    call add(s:config_params_mv, 'autoclose')
-    call add(s:config_params_mv, 'autoclose_min_lines')
-    call add(s:config_params_mv, 'variable_remember')
-
-    " Script parameters
-    let s:script_params_mv = []
-    call add(s:script_params_mv, 'use_result_buffer')
-    call add(s:script_params_mv, 'buffer_lines')
-    call add(s:script_params_mv, 'result_bufnr')
-    call add(s:script_params_mv, 'history_bufnr')
-    call add(s:script_params_mv, 'history_file')
-    call add(s:script_params_mv, 'history_size')
-    call add(s:script_params_mv, 'history_max_entry')
-    call add(s:script_params_mv, 'dbext_version')
-    call add(s:script_params_mv, 'inputdialog_cancel_support')
-    call add(s:script_params_mv, 'buffers_with_dict_files')
-    call add(s:script_params_mv, 'use_win32_filenames')
-    call add(s:script_params_mv, 'temp_file')
-    call add(s:script_params_mv, 'window_use_horiz')
-    call add(s:script_params_mv, 'window_use_bottom')
-    call add(s:script_params_mv, 'window_use_right')
-    call add(s:script_params_mv, 'window_width')
-    call add(s:script_params_mv, 'window_increment')
-    call add(s:script_params_mv, 'login_script_dir')
-
-    " DB server specific params
-    " See below for 3 additional DB2 items
-    let s:db_params_mv = []
-    call add(s:db_params_mv, 'bin')
-    call add(s:db_params_mv, 'cmd_header')
-    call add(s:db_params_mv, 'cmd_terminator')
-    call add(s:db_params_mv, 'cmd_options')
-    call add(s:db_params_mv, 'on_error')
-
-    " DBI configuration parameters
-    let s:config_dbi_mv = []
-    call add(s:config_dbi_mv, 'DBI_max_rows')
-    call add(s:config_dbi_mv, 'DBI_disconnect_onerror')
-    call add(s:config_dbi_mv, 'DBI_commit_on_disconnect')
-    call add(s:config_dbi_mv, 'DBI_split_on_pattern')
-    call add(s:config_dbi_mv, 'DBI_read_file_cmd')
-    call add(s:config_dbi_mv, 'DBI_cmd_terminator')
-    call add(s:config_dbi_mv, 'DBI_orientation')
-    call add(s:config_dbi_mv, 'DBI_column_delimiter')
-
-    " DBI connection attributes
-    let s:db_dbi_mv = []
-    call add(s:db_dbi_mv, 'AutoCommit')
-    call add(s:db_dbi_mv, 'PrintError')
-    call add(s:db_dbi_mv, 'PrintWarn')
-    call add(s:db_dbi_mv, 'RaiseError')
-    call add(s:db_dbi_mv, 'Name')
-    call add(s:db_dbi_mv, 'Statement')
-    call add(s:db_dbi_mv, 'RowCacheSize')
-    call add(s:db_dbi_mv, 'Username')
-    call add(s:db_dbi_mv, 'Warn')
-    call add(s:db_dbi_mv, 'Active')
-    call add(s:db_dbi_mv, 'Executed')
-    call add(s:db_dbi_mv, 'Kids')
-    call add(s:db_dbi_mv, 'ActiveKids')
-    call add(s:db_dbi_mv, 'CachedKids')
-    call add(s:db_dbi_mv, 'Type')
-    call add(s:db_dbi_mv, 'ChildHandles')
-    call add(s:db_dbi_mv, 'CompatMode')
-    call add(s:db_dbi_mv, 'InactiveDestroy')
-    call add(s:db_dbi_mv, 'HandleError')
-    call add(s:db_dbi_mv, 'HandleSetError')
-    call add(s:db_dbi_mv, 'ErrCount')
-    call add(s:db_dbi_mv, 'ShowErrorStatement')
-    call add(s:db_dbi_mv, 'TraceLevel')
-    call add(s:db_dbi_mv, 'FetchHashKeyName')
-    call add(s:db_dbi_mv, 'ChopBlanks')
-    call add(s:db_dbi_mv, 'LongReadLen')
-    call add(s:db_dbi_mv, 'LongTruncOk')
-    call add(s:db_dbi_mv, 'TaintIn')
-    call add(s:db_dbi_mv, 'TaintOut')
-    call add(s:db_dbi_mv, 'Taint')
-    call add(s:db_dbi_mv, 'Profile')
-
-    " All parameters
-    let s:all_params_mv = []
-    call extend(s:all_params_mv, s:conn_params_mv)
-    call extend(s:all_params_mv, s:config_params_mv)
-    call extend(s:all_params_mv, s:script_params_mv)
-
-    let loop_count         = 0
-    let s:prompt_type_list = "\n0. None"
-
-    for type_mv in s:db_types_mv
-        let loop_count = loop_count + 1
-        let s:prompt_type_list = s:prompt_type_list . "\n" . loop_count . '. ' . type_mv 
-        for param_mv in s:db_params_mv
-            call add(s:all_params_mv, type_mv.'_'.param_mv)
-        endfor
-    endfor
-
-    " Add 3 additional DB2 special cases
-    call add(s:all_params_mv, 'DB2_use_db2batch')
-    call add(s:all_params_mv, 'DB2_db2cmd_bin')
-    call add(s:all_params_mv, 'DB2_db2cmd_cmd_options')
-
-    " Add 1 additional MySQL special cases
-    call add(s:all_params_mv, 'MYSQL_version')
-
-
-    " Any predefined global connection profiles in the users vimrc
-    let s:conn_profiles_mv    = []
-    let loop_count            = 1
-    let s:prompt_profile_list = "0. None"
-
-
-    " Check if the user has any profiles defined in his vimrc
-    redir => vars
-    silent! let g:
-    redir END
-    let varlist = split(vars, '\n')
-    call map(varlist, 'matchstr(v:val, ''^\S\+'')')
-    call filter(varlist, 'v:val =~ ''^dbext_default_profile_''')
-
-	for item in varlist
-        let prof_name = matchstr(item, 'dbext_default_profile_\zs\(\w\+\)')
-        if strlen(prof_name) > 0
-            call add(s:conn_profiles_mv, prof_name)
-        endif
-	endfor
-    " Sort the list ignoring CaSe
-    let s:conn_profiles_mv = sort(s:conn_profiles_mv,1)
-    " Build the profile prompt string
-	for item in s:conn_profiles_mv
-            let s:prompt_profile_list = s:prompt_profile_list . "\n" .
-                        \  loop_count . '. ' . item
-            let loop_count += 1
-	endfor
-
-    " Check if we are using Cygwin, if so, let the user override
-    " the temporary filename to use backslashes
-    if has('win32unix') && s:DB_get('use_win32_filenames') == 1
-        let l:dbext_tempfile = system('cygpath -w '.s:dbext_tempfile)
-        if v:shell_error 
-            call s:DB_warningMsg('dbext:Failed to convert Cygwin path:'.v:errmsg)
-        else
-            " If executing the Windows path inside a Cygwin shell, you must
-            " double up the backslashes
-            let s:dbext_tempfile = substitute(l:dbext_tempfile, '\\', '\\\\', 'g')
-        endif
-        " let s:dbext_tempfile = substitute(s:dbext_tempfile, '/', '\', 'g')
-    endif
-endfunction 
-"}}}
-
-" Configuration {{{
-"" Execute function, but prompt for parameters if necessary
-function! dbext#DB_execFuncWCheck(name,...)
-    " Record current buffer to return to the correct one
-    let s:dbext_prev_winnr = winnr()
-    let s:dbext_prev_bufnr = bufnr('%')
- 
-    let use_defaults = 1
-    if s:DB_get("buffer_defaulted") != 1
-        let rc = s:DB_resetBufferParameters(use_defaults)
-        if rc == -1
-            call s:DB_warningMsg( "dbext:A valid database type must be chosen" )
-            return -1
-        endif
-        if a:name == 'promptForParameters'
-            " Handle the special case where no parameters were defaulted
-            " but the process of resettting them has defaulted them.
-            call s:DB_warningMsg( "dbext:Connection parameters have been defaulted" )
-        endif
-    endif
-
-    if exists('*s:DB_'.a:name) == 0
-        call s:DB_warningMsg( "dbext:Function DB_".a:name." does not exist" )
-        return "-1"
-    endif
-
-    echon 'dbext: Executing SQL at '.strftime("%H:%M")
-
-    " Could not figure out how to do this with an unlimited #
-    " of variables, so I limited this to 4.  Currently we only use
-    " 1 parameter in the code (May 2004), so that should be fine.
-    if a:0 == 0
-        return s:DB_{a:name}()
-    elseif a:0 == 1
-        return s:DB_{a:name}(a:1)
-    elseif a:0 == 2
-        return s:DB_{a:name}(a:1, a:2)
-    elseif a:0 == 3
-        return s:DB_{a:name}(a:1, a:2, a:3)
-    else
-        return s:DB_{a:name}(a:1, a:2, a:3, a:4)
-    endif
-endfunction
-
-"" Execute function, but prompt for parameters if necessary
-function! dbext#DB_execFuncTypeWCheck(name,...)
-
-    " Record current buffer to return to the correct one
-    let s:dbext_prev_winnr = winnr()
-    let s:dbext_prev_bufnr = bufnr('%')
- 
-    let use_defaults = 1
-    if s:DB_get("buffer_defaulted") != 1
-        let rc = s:DB_resetBufferParameters(use_defaults)
-        if rc == -1
-            call s:DB_warningMsg( "dbext:A valid database type must be chosen" )
-            return rc
-        endif
-    endif
-
-    if !exists("*s:DB_".b:dbext_type."_".a:name)
-        let value = toupper(b:dbext_type)
-        if index(s:db_types_mv, value) == -1
-            call s:DB_warningMsg("dbext:Unknown database type: " . b:dbext_type)
-            return ""
-        else
-            call s:DB_warningMsg( "dbext:s:DB_" . b:dbext_type .
-                        \ '_' . a:name . 
-                        \ ' not found'
-                        \ )
-            return ""
-        endif
-    endif
-
-    echon 'dbext: Executing SQL at '.strftime("%H:%M")
-
-    " Could not figure out how to do this with an unlimited #
-    " of variables, so I limited this to 4.  Currently we only use
-    " 1 parameter in the code (May 2004), so that should be fine.
-    if a:0 == 0
-        return s:DB_{b:dbext_type}_{a:name}()
-    elseif a:0 == 1
-        return s:DB_{b:dbext_type}_{a:name}(a:1)
-    elseif a:0 == 2
-        return s:DB_{b:dbext_type}_{a:name}(a:1, a:2)
-    elseif a:0 == 3
-        return s:DB_{b:dbext_type}_{a:name}(a:1, a:2, a:3)
-    else
-        return s:DB_{b:dbext_type}_{a:name}(a:1, a:2, a:3, a:4)
-    endif
-endfunction
-
-function! s:DB_getTblAlias(table_name) 
-    let owner      = s:DB_getObjectOwner(a:table_name)
-    let table_name = s:DB_getObjectName(a:table_name)
-    let tbl_alias = ''
-    if s:DB_get("use_tbl_alias") != 'n'
-
-        if 'da' =~? s:DB_get("use_tbl_alias")
-            if table_name =~ '_'
-                " Treat _ as separators since people often use these
-                " for word separators
-                let save_keyword = &iskeyword
-                setlocal iskeyword-=_
-
-                " Get the first letter of each word
-                " [[:alpha:]] is used instead of \w 
-                " to catch extended accented characters
-                "
-                let initials = substitute( 
-                            \ table_name, 
-                            \ '\<[[:alpha:]]\+\>_\?', 
-                            \ '\=strpart(submatch(0), 0, 1)', 
-                            \ 'g'
-                            \ )
-                " Restore original value
-                let &iskeyword = save_keyword
-            elseif table_name =~ '\u\U'
-                let initials = substitute(
-                            \ table_name, '\(\u\)\U*', '\1', 'g')
-            else
-                let initials = strpart(table_name, 0, 1)
-            endif
-
-            if 'a' =~? s:DB_get("use_tbl_alias")
-                let tbl_alias = inputdialog("Enter table alias:", initials)
-            else
-                let tbl_alias = initials
-            endif
-        endif
-        " Following a word character, make sure there is a . and no spaces
-        let tbl_alias = substitute(tbl_alias, '\w\zs\.\?\s*$', '.', '')
-    endif
-
-    return tbl_alias
-endfunction 
-
-function! s:DB_getTitle() 
-    let no_defaults  = 0
-    let buffer_title = 0
-
-    if s:DB_get("custom_title") == ''
-        let buffer_title = '' .
-                    \ s:DB_option('T(', s:DB_get("type"),          ')  ') .
-                    \ s:DB_option('H(', s:DB_get("host"),          ')  ') .
-                    \ s:DB_option('P(', s:DB_get("port"),          ')  ') .
-                    \ s:DB_option('S(', s:DB_get("srvname"),       ')  ') .
-                    \ s:DB_option('O(', s:DB_get("dsnname"),       ')  ') .
-                    \ s:DB_option('D(', s:DB_get("dbname"),        ')  ') .
-                    \ s:DB_option('I(', s:DB_get("driver"),        ')  ') .
-                    \ s:DB_option('C(', s:DB_get("conn_parms"),    ')  ') .
-                    \ s:DB_option('P(', s:DB_get("driver_parms"),  ')  ')
-
-        if s:DB_get("integratedlogin") == '1'
-            if has("win32")
-                let buffer_title = buffer_title . 
-                            \ s:DB_option('U(', expand("$USERNAME"), ')  ') 
-            else
-                let buffer_title = buffer_title . 
-                            \ s:DB_option('U(', expand("$USER"), ')  ') 
-            endif
-        else
-            let buffer_title = buffer_title . 
-                        \ s:DB_option('U(', s:DB_get("user"), ')  ')
-        endif
-
-    else
-        let buffer_title = s:DB_get("custom_title")
-    endif
-
-    return buffer_title
-endfunction 
-
-function! dbext#DB_setTitle() 
-    let no_defaults = 0
-
-    " In order to parse a statement, we must know what database type
-    " we are dealing with to choose the correct cmd_terminator
-    if s:DB_get("buffer_defaulted") == 1
-        if s:DB_get("replace_title") == 1 && s:DB_get("type", no_defaults) != ''
-            let &titlestring = s:DB_getTitle()
-        endif
-    endif
-
-endfunction 
-
-"" Set buffer parameter value
-function! s:DB_set(name, value)
-    if index(s:all_params_mv, a:name) > -1
-        let value = a:value
-
-        " If a value of -1 is provided assume an error
-        " somewhere an abort
-        if value == -1 
-            return -1
-        endif
-
-        " Handle some special cases
-        if (a:name ==# "type")
-            " Do not check if the type already exists since
-            " performing this additional check prevents the type
-            " from being set to "@askb", so the user would never 
-            " be prompted for a value.
-            let value = toupper(value)
-        endif
-        " Profile will have to be retrieved from your vimrc
-        " and each option must be processed
-        if a:name == 'profile'
-            " Now set the connection parameters from the profile
-            if s:DB_parseProfile(value) == -1
-                return -1
-            endif
-        endif
-
-        if index(s:script_params_mv, a:name) > -1
-            let s:dbext_{a:name} = value
-        else
-            let b:dbext_{a:name} = value
-        endif
-
-        if s:DB_get("replace_title") == '1'
-            call dbext#DB_setTitle()
-        endif
-    elseif index(s:config_dbi_mv, a:name) > -1
-        if a:value."" == ""
-            call s:DB_set(a:name, s:DB_getDefault(a:name))
-        else
-            let b:dbext_{a:name} = a:value
-        endif
-        if a:name == 'DBI_commit_on_disconnect'
-            " Special case since this option must be set
-            " both in the DBI layer and the dbext plugin
-            call s:DB_DBI_setOption(a:name, a:value)
-        endif
-    elseif index(s:saved_conn_params_mv, a:name) > -1
-        " Store these parameters as script variables
-        " since only 1 should ever be active at a time
-        let s:dbext_{a:name} = a:value
-    else
-        if index(s:db_dbi_mv, a:name) > -1
-            let rc = 0
-            if s:DB_get('type') =~ '\<DBI\>\|\<ODBC\>'
-                let rc = s:DB_DBI_setOption(a:name, a:value)
-            endif
-            return rc
-        endif
-
-        call s:DB_warningMsg("dbext:Unknown parameter: " . a:name)
-        return -1
-    endif
-
-    return 0
-endfunction
-
-"" Set global variable parameter value
-function! s:DB_setGlobal(name, value)
-    let g:dbext_default_{a:name} = a:value
-
-    return 0
-endfunction
-
-"" Set buffer parameter value based on database type
-function! s:DB_setWType(name, value)
-    let var_name = b:dbext_type."_".a:name
-    call s:DB_set(var_name, a:value )
-endfunction
-
-"" Escape any special characters
-function! s:DB_escapeStr(value)
-    " Any special characters must be escaped before they can be used in a
-    " search string or on the command line
-    let escaped_str = 
-                \ substitute(
-                \     substitute(
-                \         escape(a:value, '\\/.*$^~[]'),
-                \         "\n$", 
-                \         "", ""
-                \     ),
-                \     "\n", '\\_[[:return:]]', "g"
-                \ )
-    return escaped_str
-endfunction
-
-"" Get buffer parameter value
-function! dbext#DB_listOption(...)
-    let use_defaults = 1
-
-    " Use defaults as the default for this function
-    if (a:0 > 0) && strlen(a:1) > 0
-        return s:DB_get(a:1, use_defaults)
-    endif
-
-    " Record current buffer to return to the correct one
-    let s:dbext_prev_winnr = winnr()
-    let s:dbext_prev_bufnr = bufnr('%')
-
-    let conn_params_cnt   = len(s:conn_params_mv)
-    let config_params_cnt = len(s:config_params_mv)
-    let script_params_cnt = len(s:script_params_mv)
-
-    let option_cnt  = 1
-    let option_list = 
-                \ "------------------------\n" .
-                \ "** Connection Options **\n" .
-                \ "------------------------\n"
-    for param_mv in s:all_params_mv
-        if option_cnt == (conn_params_cnt + 1) 
-            let option_list = option_list .
-                        \ "---------------------------\n" .
-                        \ "** Configuration Options **\n" .
-                        \ "---------------------------\n"
-        elseif option_cnt == (conn_params_cnt +
-                    \ config_params_cnt + 1)  
-            let option_list = option_list .
-                        \ "--------------------------\n" .
-                        \ "** Script Level Options **\n" .
-                        \ "--------------------------\n"
-        elseif option_cnt == (conn_params_cnt +
-                    \ config_params_cnt +
-                    \ script_params_cnt + 1)  
-            let option_list = option_list .
-                        \ "----------------------\n" .
-                        \ "** Database Options **\n" .
-                        \ "----------------------\n"
-        endif
-        let opt_name    = param_mv
-        try
-            let opt_value   = opt_name . ' = ' . s:DB_get(opt_name)
-        catch
-            call s:DB_errorMsg('Failed to get:'.opt_name)
-        endtry
-        let option_list = option_list . opt_value . "\n"
-        let option_cnt  = option_cnt + 1
-    endfor
-     
-    let option_list = option_list .
-                \ "---------------------\n" .
-                \ "** DBI / DBI::ODBC **\n" .
-                \ "---------------------\n"
-    for dbi_mv in s:config_dbi_mv
-        let opt_name    = dbi_mv
-        let opt_value   = opt_name . ' = ' . s:DB_get(opt_name)
-        let option_list = option_list . opt_value . "\n"
-        let option_cnt  = option_cnt + 1
-    endfor
-     
-    let option_list = option_list .
-                \ "--------------\n" .
-                \ "** Profiles **\n" .
-                \ "--------------\n"
-    for profile_mv in s:conn_profiles_mv
-        let opt_name    = profile_mv
-        " let opt_value   = opt_name . ' = ' . s:DB_get(opt_name)
-        let opt_value   = ''
-        if exists('g:dbext_default_profile_'.opt_name)
-            let opt_value = matchstr(g:dbext_default_profile_{opt_name}, 'type=\zs\w\+\ze\(:\|$\)')
-        endif
-        let option_list = option_list . opt_name . ' T(' . opt_value . ")\n"
-    endfor
-     
-    let option_list = option_list .
-                \ "-------------------------------\n" .
-                \ "** Overrides (via the vimrc) **\n" .
-                \ "-------------------------------\n"
-    " Check if the user has any profiles defined in his vimrc
-    let saveA = @a
-    redir  @a
-    silent! exec 'let'
-    redir END
-    let l:global_vars = @a
-    let @a = saveA
-
-    let dbext_default_prefix = 'dbext_default_\zs\(\w\+\)'
-    let index = match(l:global_vars, dbext_default_prefix)
-    while index > -1
-        " Retrieve the name of option
-        let opt_name = matchstr(l:global_vars, '\w\+', index)
-        if strlen(opt_name) > 0
-            let opt_value = matchstr(l:global_vars, '\s*\zs[^'."\<C-J>".']\+', 
-                        \ (index + strlen(opt_name))  )
-            if opt_name !~ 'profile_'
-                let option_list = option_list . opt_name . ' = ' . opt_value . "\n"
-            endif
-        endif
-        let index = index + strlen(opt_name)+ strlen(opt_value) + 1
-        let index = match(l:global_vars, dbext_default_prefix, index)
-    endwhile
-
-    let option_list = option_list .
-                \ "-------------------------------\n" .
-                \ "** Vim Version Information   **\n" .
-                \ "-------------------------------\n"
-    " Check if the user has any profiles defined in his vimrc
-    redir => vim_version_info
-    silent! version
-    redir END
-    let option_list = option_list . vim_version_info . "\n"
-
-    call s:DB_addToResultBuffer(option_list, "clear")
-
-    return ""
-endfunction
-
-"" Get buffer parameter value
-function! s:DB_get(name, ...)
-    " Use defaults as the default for this function
-    let use_defaults = ((a:0 > 0)?(a:1+0):1)
-    let no_default   = 0
-
-    " Most parameters are buffer specific
-    let prefix = "b:dbext_"
-
-    " These two Lists store the list of parameters
-    " that are script wide
-    if index(s:script_params_mv, a:name) > -1
-        let prefix = "s:dbext_"
-    endif
-    if index(s:saved_conn_params_mv, a:name) > -1
-        let prefix = "s:dbext_"
-    endif
-
-    if exists(prefix.a:name)
-        try
-            let retval = {prefix}{a:name} . '' "force string
-        catch
-            let retval = join({prefix}{a:name}, ',') . '' "force string
-        endtry
-    elseif use_defaults == 1
-        let retval = s:DB_getDefault(a:name)
-    else
-        let retval = ''
-    endif
-
-    if exists("b:dbext_prompting_user") && b:dbext_prompting_user != 1
-        if retval =~? "@ask"
-            let retval = s:DB_promptForParameters(a:name)
-        endif
-    endif
-
-    return retval
-endfunction
-
-"" Get buffer parameter value based on database type
-function! dbext#DB_getWType(name)
-    if exists("b:dbext_type")
-