Updated runtime files.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2007 Aug 30
|
||||
" Last Change: 2010 Mar 23
|
||||
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
@ -161,7 +161,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
|
||||
else
|
||||
" Completing "var.", "var.something", etc.
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[-1], 0, 1)
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,23 @@
|
||||
" Vim OMNI completion script for SQL
|
||||
" Language: SQL
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 7.0
|
||||
" Last Change: 2009 Jan 04
|
||||
" Version: 9.0
|
||||
" Last Change: 2010 Apr 20
|
||||
" Usage: For detailed help
|
||||
" ":help sql.txt"
|
||||
" or ":help ft-sql-omni"
|
||||
" or read $VIMRUNTIME/doc/sql.txt
|
||||
|
||||
" History
|
||||
" Version 9.0
|
||||
" This change removes some of the support for tables with spaces in their
|
||||
" names in order to simplify the regexes used to pull out query table
|
||||
" aliases for more robust table name and column name code completion.
|
||||
" Full support for "table names with spaces" can be added in again
|
||||
" after 7.3.
|
||||
" Version 8.0
|
||||
" Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left
|
||||
" when drilling in and out of a column list for a table.
|
||||
" Version 7.0
|
||||
" Better handling of object names
|
||||
" Version 6.0
|
||||
@ -250,7 +259,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
" 1. Check if the dbext plugin has the option turned
|
||||
" on to even allow owners
|
||||
" 2. Based on 1, if the user is showing a table list
|
||||
" and the DrillIntoTable (using <C-Right>) then
|
||||
" and the DrillIntoTable (using <Right>) then
|
||||
" this will be owner.table. In this case, we can
|
||||
" check to see the table.column exists in the
|
||||
" cached table list. If it does, then we have
|
||||
@ -390,13 +399,14 @@ function! sqlcomplete#DrillIntoTable()
|
||||
call sqlcomplete#Map('column')
|
||||
" C-Y, makes the currently highlighted entry active
|
||||
" and trigger the omni popup to be redisplayed
|
||||
call feedkeys("\<C-Y>\<C-X>\<C-O>")
|
||||
call feedkeys("\<C-Y>\<C-X>\<C-O>", 'n')
|
||||
else
|
||||
if has('win32')
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" <C-Right> behaviour
|
||||
exec "normal! \<C-Right>"
|
||||
endif
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" key behaviour.
|
||||
" Must use exec since they key must be preceeded by "\"
|
||||
" or feedkeys will simply push each character of the string
|
||||
" rather than the "key press".
|
||||
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")'
|
||||
endif
|
||||
return ""
|
||||
endfunction
|
||||
@ -408,11 +418,12 @@ function! sqlcomplete#DrillOutOfColumns()
|
||||
" Trigger the omni popup to be redisplayed
|
||||
call feedkeys("\<C-X>\<C-O>")
|
||||
else
|
||||
if has('win32')
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" <C-Left> behaviour
|
||||
exec "normal! \<C-Left>"
|
||||
endif
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" key behaviour.
|
||||
" Must use exec since they key must be preceeded by "\"
|
||||
" or feedkeys will simply push each character of the string
|
||||
" rather than the "key press".
|
||||
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")'
|
||||
endif
|
||||
return ""
|
||||
endfunction
|
||||
@ -609,7 +620,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" Search backwards to the beginning of the statement
|
||||
" and do NOT wrap
|
||||
" exec 'silent! normal! v?\<\(select\|update\|delete\|;\)\>'."\n".'"yy'
|
||||
exec 'silent! normal! ?\<\(select\|update\|delete\|;\)\>'."\n"
|
||||
exec 'silent! normal! ?\<\c\(select\|update\|delete\|;\)\>'."\n"
|
||||
|
||||
" Start characterwise visual mode
|
||||
" Advance right one character
|
||||
@ -618,27 +629,38 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" 2. A ; at the end of a line (the delimiter)
|
||||
" 3. The end of the file (incase no delimiter)
|
||||
" Yank the visually selected text into the "y register.
|
||||
exec 'silent! normal! vl/\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy'
|
||||
exec 'silent! normal! vl/\c\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy'
|
||||
|
||||
let query = @y
|
||||
let query = substitute(query, "\n", ' ', 'g')
|
||||
let found = 0
|
||||
|
||||
" if query =~? '^\(select\|update\|delete\)'
|
||||
if query =~? '^\(select\)'
|
||||
" if query =~? '^\c\(select\)'
|
||||
if query =~? '^\(select\|update\|delete\)'
|
||||
let found = 1
|
||||
" \(\(\<\w\+\>\)\.\)\? -
|
||||
" 'from.\{-}' - Starting at the from clause
|
||||
" '\c\(from\|join\|,\).\{-}' - Starting at the from clause (case insensitive)
|
||||
" '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional)
|
||||
" '\<\w\+\>\ze' - Get the table name
|
||||
" '\s\+\<'.table_name.'\>' - Followed by the alias
|
||||
" '\s*\.\@!.*' - Cannot be followed by a .
|
||||
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
|
||||
" '.*' - Exclude the rest of the line in the match
|
||||
" let table_name_new = matchstr(@y,
|
||||
" \ '\c\(from\|join\|,\).\{-}'.
|
||||
" \ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
|
||||
" \ '\("\|\[\)\?.\{-}\("\|\]\)\?\ze'.
|
||||
" \ '\s\+\%(as\s\+\)\?\<'.
|
||||
" \ matchstr(table_name, '.\{-}\ze\.\?$').
|
||||
" \ '\>'.
|
||||
" \ '\s*\.\@!.*'.
|
||||
" \ '\(\<where\>\|$\)'.
|
||||
" \ '.*'
|
||||
" \ )
|
||||
let table_name_new = matchstr(@y,
|
||||
\ 'from.\{-}'.
|
||||
\ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
|
||||
\ '\("\|\[\)\?.\{-}\("\|\]\)\ze'.
|
||||
\ '\c\(\<from\>\|\<join\>\|,\)\s*'.
|
||||
\ '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?'.
|
||||
\ '\("\|\[\)\?\w\+\("\|\]\)\?\ze'.
|
||||
\ '\s\+\%(as\s\+\)\?\<'.
|
||||
\ matchstr(table_name, '.\{-}\ze\.\?$').
|
||||
\ '\>'.
|
||||
@ -649,7 +671,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
|
||||
if table_name_new != ''
|
||||
let table_alias = table_name
|
||||
let table_name = table_name_new
|
||||
let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' )
|
||||
|
||||
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
|
||||
if list_idx > -1
|
||||
@ -717,4 +739,3 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
|
||||
return table_cols
|
||||
endfunction
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
" vimball.vim : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Dec 28, 2009
|
||||
" Version: 30
|
||||
" Date: Apr 12, 2010
|
||||
" Version: 31
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2009 by Charles E. Campbell, Jr.
|
||||
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
@ -14,7 +14,7 @@
|
||||
if &cp || exists("g:loaded_vimball")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_vimball = "v30"
|
||||
let g:loaded_vimball = "v31"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of vimball needs vim 7.2"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jul 30, 2008
|
||||
" Version: 22
|
||||
" Date: Apr 12, 2010
|
||||
" Version: 23
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
|
||||
@ -16,13 +16,19 @@
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
if &cp || exists("g:loaded_zip") || v:version < 700
|
||||
if &cp || exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zip= "v23"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of zip needs vim 7.2"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
let g:loaded_zip = "v22"
|
||||
let s:zipfile_escape = ' ?&;\'
|
||||
let s:ERROR = 2
|
||||
let s:WARNING = 1
|
||||
|
||||
Reference in New Issue
Block a user