In vim 7.2, SQL completion fails on virtually any input with:
"Omni complete (^O^N^P) Pattern not found"
Looking into the function, I see
in /usr/share/vim/vim72/autoload/sqlcomplete.vim
in function sqlcomplete#Complete(findstart,base)
98 if a:findstart
99 " Locate the start of the item, including "."
100 let line = getline('.')
101 let start = col('.') - 1
102 let lastword = -1
103 let begindot = 0
104 " Check if the first character is a ".", for column completion
105 if line[start - 1] == '.'
106 let begindot = 1
107 endif
108 while start > 0
109 if line[start - 1] =~ '\(\w\|\s\+\)'
110 let start -= 1
If I change line 109's pattern from '\(\w\|\s\+\)' to '\w', completion
seems to work fine. I also noticed that I get completion if I'm in the
first column. So... what's that alternation *supposed* to catch?
(Looks like it's trying to catch table names with spaces in them, but
not looking for some kind of start quote.) Or is this a bug?
Best,
Ben
I suspect you are using an older version of this than myself.
I am running this version:
autoload\sqlcomplete.vim
" Version: 7.0
Can you verify what version you are using.
The version 7.0 is available via CVS/SVN.
Dave
Hmm. Yes, I'm using an older version (6.0 included w/ vim 7.2.257).
AFAICT, though, Vim's own SVN still has that version (committed in
r1078), and I didn't see any mention of CVS/SVN on the various
vim.org/scripts pages (dbext/sqlcomplete), nor in the file itself... I
feel like I'm overlooking something...
Best,
Ben
I am glad the SQLComplete 7.0 solves the issues.
Please keep the reports coming, both bugs and suggestions, feedback is
always appreciated.
Dave