question in my original thread by self-replying to the second. Sorry
for the re-post, but this is biting me again.]
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
No comments:
Post a Comment