Omnicomplete query

83 views
Skip to first unread message

Michael

unread,
Apr 26, 2012, 9:28:26 AM4/26/12
to vorax-discuss
Hi there,

I just started using vorax, and I'm very impressed.

I just have one quick question. When using omnicomplete, I've noticed
that database objects are all in lowercase, but PL/SQL procedure and
function parameters are in uppercase. Is it possible to display these
in lowercase instead?

Thanks,
Michael

talek

unread,
Apr 26, 2012, 9:49:46 AM4/26/12
to vorax-discuss
Hi,

They should be in lowercase because I also don't like them in
uppercase. I tested with:

exec dbms_stats.gather_schema_stats(<-- lowercase arguments

Do you have an example so that to be able to reproduce the problem?

Michael Maddern

unread,
Apr 26, 2012, 10:10:21 AM4/26/12
to vorax-...@googlegroups.com
Hi,

Thanks for the quick reply!

For me, the example you have given doesn't work. The completion for dbms_stats, gives the procedure in lower case, but the completion for gather_schema_status gives the parameters in uppercase. I've attached a couple of screenshots showing this (I'm not sure if you can see these in google groups)?

Thanks,
Michael
Screen Shot 2012-04-26 at 15.03.32.png
Screen Shot 2012-04-26 at 15.03.49.png

talek

unread,
Apr 26, 2012, 11:07:14 AM4/26/12
to vorax-discuss
Okey, it might be a bug! VoraX should take into consideration the way
you type. If the package/procedure is written with lowercase the omni
should follow this convention. So, I kindly ask you to:

- open vorax/lib/vim/vorax_completion.vim
- go to line 1517: function s:ParamsFor(owner, module, submodule)
- add a "echom" call and print the value of a:submodule and the result
of the s:utils.IsLower(a:submodule)

If you always type in lowercase then you may easily change this
function to always return in lowercase.

Thanks!

On Apr 26, 5:10 pm, Michael Maddern <michael.madd...@gmail.com> wrote:
> Hi,
>
> Thanks for the quick reply!
>
> For me, the example you have given doesn't work. The completion for
> dbms_stats, gives the procedure in lower case, but the completion for
> gather_schema_status gives the parameters in uppercase. I've attached a
> couple of screenshots showing this (I'm not sure if you can see these in
> google groups)?
>
> Thanks,
> Michael
>
> On 26 April 2012 14:49, talek <alexandru.t...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > They should be in lowercase because I also don't like them in
> > uppercase. I tested with:
>
> > exec dbms_stats.gather_schema_stats(<-- lowercase arguments
>
> > Do you have an example so that to be able to reproduce the problem?
>
> > On Apr 26, 4:28 pm, Michael <michael.madd...@gmail.com> wrote:
> > > Hi there,
>
> > > I just started using vorax, and I'm very impressed.
>
> > > I just have one quick question. When using omnicomplete, I've noticed
> > > that database objects are all in lowercase, but PL/SQL procedure and
> > > function parameters are in uppercase. Is it possible to display these
> > > in lowercase instead?
>
> > > Thanks,
> > > Michael
>
>
>
>  Screen Shot 2012-04-26 at 15.03.32.png
> 503KViewDownload
>
>  Screen Shot 2012-04-26 at 15.03.49.png
> 585KViewDownload

Michael

unread,
Apr 26, 2012, 11:41:01 AM4/26/12
to vorax-...@googlegroups.com
Hi,

Thanks for your fast help with this. The output is:

GATHER_SCHEMA_STATS 0

So for some reason it thinks the package name was entered in uppercase, but it's definitely lower case.

Anyway I put a workaround in as you suggest to always return lowercase, so I'm happy with this.

Would you like me to raise this in your defect list (if I have permissions)?

My preference would be to see the parameters names in lowercase, but the types in uppercase (something like "ownname => VARCHAR2  o1") - not sure if this is possible though?

talek

unread,
Apr 26, 2012, 2:17:32 PM4/26/12
to vorax-discuss
Thanks Michael for digging into this.
You are welcome to report this bug on the Issues page and, of course,
any feature request.
By the way, apparently VoraX 3.0 has the same bug so I'm glad you
found it!

Michael Maddern

unread,
Apr 30, 2012, 4:02:45 PM4/30/12
to vorax-...@googlegroups.com
Hi,

I've raised a bug for this on your issues page. I've also noticed some strange behaviour when executing anonymous blocks of PL/SQL. I've put the details below, can you let me know what you think? I can raise another bug for this.

If I execute a block of PL/SQL using \ve it just stays "Executing..." forever. For example using the following code:

begin
   dbms_output.put_line('Test');
end;
/

If I use \vb it works okay, but obviously executes everything and not just the current PL/SQL block. I think the problem using \ve is maybe that it doesn't send the final /, so the statement is never executed, and SQLPlus is waiting for further input. In the same way, if I make a mistake and try to execute an incomplete block of PL/SQL (i.e. without the "end;" line), it stays "Executing..." forever, again I guess this is because SQLPlus is waiting for more input.

When this happens, if I use ctrl+c, it prompts "Are you sure you want to cancel the execution of this statement? (y/[N]):" I choose y, and Vim freezes.

talek

unread,
May 1, 2012, 4:10:32 AM5/1/12
to vorax-discuss
Hi,

Thanks for reporting the omni-completion bug. As far as executing a PL/
SQL block I hope this is already addressed in VoraX 3.0. I strongly
recommend to switch to this version because it has more features and I
expect to perform better, even it is in a beta stage.

VoraX 3.0 on github: http://github.com/talek/vorax
Installation guide: https://github.com/talek/vorax/wiki/Installation-Guide
Documentation: https://github.com/talek/vorax/blob/master/doc/vorax.txt

I didn't tested much on a MacOS because I don't have this environment
available but I will provide support and I can easily install a MacOS
virtual machine.


On Apr 30, 11:02 pm, Michael Maddern <michael.madd...@gmail.com>
wrote:
> Hi,
>
> I've raised a bug for this on your issues page. I've also noticed some
> strange behaviour when executing anonymous blocks of PL/SQL. I've put the
> details below, can you let me know what you think? I can raise another bug
> for this.
>
> If I execute a block of PL/SQL using \ve it just stays "Executing..."
> forever. For example using the following code:
>
> begin
>    dbms_output.put_line('Test');
> end;
> /
>
> If I use \vb it works okay, but obviously executes everything and not just
> the current PL/SQL block. I think the problem using \ve is maybe that it
> doesn't send the final /, so the statement is never executed, and SQLPlus
> is waiting for further input. In the same way, if I make a mistake and try
> to execute an incomplete block of PL/SQL (i.e. without the "end;" line), it
> stays "Executing..." forever, again I guess this is because SQLPlus is
> waiting for more input.
>
> When this happens, if I use ctrl+c, it prompts "Are you sure you want to
> cancel the execution of this statement? (y/[N]):" I choose y, and Vim
> freezes.
>

Michael Maddern

unread,
May 1, 2012, 11:33:29 AM5/1/12
to vorax-...@googlegroups.com
Is there an official beta release for VoraX 3.0? I've taken the latest source from your github, but there it looks like there are a few bugs. For example, when I open the Connection Profiles window, I get the following error:

Error detected while processing function vorax#GetProfilesHandler..voraxlib#panel#profiles#New:
line   26:
NameError: (eval): uninitialized constant Vorax
Error detected while processing function 46..25..35..37..41..47:
line    7:
NoMethodError: undefined method `repository_xml' for nil:NilClass
Error detected while processing function 46..25..35..37..41:
line    4:
E712: Argument of filter() must be a List or Dictionary
E712: Argument of map() must be a List or Dictionary
line    5:
E712: Argument of filter() must be a List or Dictionary
E712: Argument of map() must be a List or Dictionary
line    7:
E712: Argument of extend() must be a List or Dictionary
Error detected while processing function 46..25..35..37..41..voraxlib#utils#SortUnique:
line    2:
E714: List required

talek

unread,
May 1, 2012, 2:37:54 PM5/1/12
to vorax-discuss
There's no official beta release yet.

Did you uninstall the old vorax?
Meanwhile, I'm trying to get a VMWARE Mac OS image in order to test
the installation on this platform and I will come back to you shortly.

Michael Maddern

unread,
May 1, 2012, 3:23:27 PM5/1/12
to vorax-...@googlegroups.com
Hi Alexandru,

Yes - I think I uninstalled it - I'm not an expert with vim plugins, I just deleted everything in .vim.

I also get the following error when doing VoraxConnect:



Error detected while processing function vorax#GetProfilesHandler..voraxlib#panel#profiles#New:
line   26:
NameError: (eval): uninitialized constant Vorax
Error detected while processing function 46..25..35..37..41..47:
line    7:
NoMethodError: undefined method `repository_xml' for nil:NilClass
Error detected while processing function 46..25..35..37..41:
line    4:
E712: Argument of filter() must be a List or Dictionary
E712: Argument of map() must be a List or Dictionary
line    5:
E712: Argument of filter() must be a List or Dictionary
E712: Argument of map() must be a List or Dictionary
line    7:
E712: Argument of extend() must be a List or Dictionary
Error detected while processing function 46..25..35..37..41..voraxlib#utils#SortUnique:
line    2:
E714: List required


So something is definitely wrong - maybe it could be related Mac OSX. I'm happy to try investigate if you can point me in the right direction.

Thanks,
Michael

Michael Maddern

unread,
May 1, 2012, 3:24:49 PM5/1/12
to vorax-...@googlegroups.com
Sorry - I pasted in the wrong error above. It should have been:

Error detected while processing function vorax#Connect..vorax#GetSqlplusHandler..14:
line    1:
NoMethodError: undefined method `pid' for nil:NilClass
Error detected while processing function vorax#Connect..vorax#GetSqlplusHandler..voraxlib#sqlplus#New:
line   21:

NameError: (eval): uninitialized constant Vorax
line   29:
NoMethodError: undefined method `local_login_warning' for nil:NilClass
Error detected while processing function vorax#Connect..14:
line    1:
NoMethodError: undefined method `pid' for nil:NilClass
NoMethodError: undefined method `pid' for nil:NilClass  

talek

unread,
May 2, 2012, 2:34:05 PM5/2/12
to vorax-discuss
Hi,

I was able to reproduce the error. Apparently VoraX 3.0 doesn't work
on Mac OS. :(
Hmmm, that's weird because on Linux and Windows no problems were
reported so far.
So, I guess it'll take a while to make it compatible but I will keep
you informed.

On May 1, 10:24 pm, Michael Maddern <michael.madd...@gmail.com> wrote:
> Sorry - I pasted in the wrong error above. It should have been:
>
> Error detected while processing function
> vorax#Connect..vorax#GetSqlplusHandler..14:
> line    1:
> NoMethodError: undefined method `pid' for nil:NilClass
> Error detected while processing function
> vorax#Connect..vorax#GetSqlplusHandler..voraxlib#sqlplus#New:
> line   21:
> NameError: (eval): uninitialized constant Vorax
> line   29:
> NoMethodError: undefined method `local_login_warning' for nil:NilClass
> Error detected while processing function vorax#Connect..14:
> line    1:
> NoMethodError: undefined method `pid' for nil:NilClass
> NoMethodError: undefined method `pid' for nil:NilClass
>

talek

unread,
May 3, 2012, 2:28:10 PM5/3/12
to vorax-discuss
My first finding is that some required gems are missing: activesupport
and nokogiri, which are manadatory in VoraX 3.0 and documented as
such. Unfortunately I didn't manage to install nokogiri. I have almost
zero experience with Mac OS and I don't know how to compile this
module. I've tried with macports but it complains about xcode-build
and homebrew also doesn't work. If you succeed to install it, please
let me know.
> > >> > > > > > > > > > that...
>
> read more »

Michael Maddern

unread,
May 4, 2012, 3:42:18 PM5/4/12
to vorax-...@googlegroups.com
Hi,

I've installed activesupport and nokogiri, but I still get the same error.

I installed nokogiri by installing XCode from the App Store and then "Command Line Tools for XCode" from the Apple Developer site (as described in answer #2 here: http://superuser.com/questions/154292/ruby-rubygems-why-do-i-always-get-error-messages-when-trying-to-install-gems). I didn't need to use macports.

talek

unread,
May 5, 2012, 4:39:13 AM5/5/12
to vorax-discuss
Hi,

Thanks for the update. I followed your advice and I succeeded to
install it, but apparently nokogiri can't be loaded from the MacVim
environment. I get the same errors, but, at the very beginning it says
something like:

LoadError: /Library/Ruby/Gems/1.8/gems/nokogiri-1.5.2/lib/nokogiri/
nokogiri.bundle: dlopen(..): no suitable image found.

This error is visible when you execute the :messages vim command.
Hmmm, weird! Is it the same on your platform?

Thanks!



On May 4, 10:42 pm, Michael Maddern <michael.madd...@gmail.com> wrote:
> Hi,
>
> I've installed activesupport and nokogiri, but I still get the same error.
>
> I installed nokogiri by installing XCode from the App Store and then
> "Command Line Tools for XCode" from the Apple Developer site (as described
> in answer #2 here:http://superuser.com/questions/154292/ruby-rubygems-why-do-i-always-g...).
> I didn't need to use macports.
>
> ...
>
> read more »

Michael Maddern

unread,
Jun 11, 2012, 4:50:30 AM6/11/12
to vorax-...@googlegroups.com
Hi Alexandru,

Sorry for taking so long to reply, I've been on holiday the past couple of weeks.

The problem with installing the nokogiri gem was some issue with the architecture, I got it working by setting the architecture to i386 when installing nokogiri as follows:

sudo env ARCHFLAGS="-arch i386" gem install nokogiri

Now there are no errors when Vim starts.

However, the next problem I have is that when I try to connect to a database using :VoraxConnect and following the prompts, it says "Aborted!". If I enter the database details directly after the command, this causes Vim to hang and I have to force quit. Do you have any ideas what the problem is?

Thanks,
Michael

talek

unread,
Jun 17, 2012, 5:23:12 PM6/17/12
to vorax-discuss
Hi Michael,

Hope you enjoyed your holiday!

I succeeded to reproduce the problem you described. Apparently, on
Mac, VoraX 3.0 doesn't work as expected and it will take me a while to
figure out what's going on behind. Being a beta version these kind of
"surprises" are likely to happen, especially taking into consideration
that I didn't test it on this platform at all. However, I'm in a big
VoraX redesign attempt and I promise to be more careful as far as
testing on MAC OS is concerned. I'll keep you informed about the
progress of fixing this bug.

Many thanks!

On Jun 11, 11:50 am, Michael Maddern <michael.madd...@gmail.com>
wrote:
> Hi Alexandru,
>
> Sorry for taking so long to reply, I've been on holiday the past couple of
> weeks.
>
> The problem with installing the nokogiri gem was some issue with the
> architecture, I got it working by setting the architecture to i386 when
> installing nokogiri as follows:
>
> sudo env ARCHFLAGS="-arch i386" gem install nokogiri
>
> Now there are no errors when Vim starts.
>
> However, the next problem I have is that when I try to connect to a
> database using :VoraxConnect and following the prompts, it says "Aborted!".
> If I enter the database details directly after the command, this causes Vim
> to hang and I have to force quit. Do you have any ideas what the problem is?
>
> Thanks,
> Michael
>
> ...
>
> read more »

Michael Maddern

unread,
Jun 18, 2012, 1:32:50 PM6/18/12
to vorax-...@googlegroups.com
Ok thank you. I'm actually planning to install Linux on my Mac and use that for development, so this is probably not going to be a big issue for me (I'm guessing VoraX 3.0 works much better under Linux). Oracle has very poor support for Macs - the latest full database version for Max OSX is 10g, which I don't even think is supported anymore. So I'm not sure it's really worth your efforts to support Mac OSX.
Reply all
Reply to author
Forward
0 new messages