Quick queries

66 views
Skip to first unread message

vachacz

unread,
Aug 1, 2011, 3:31:27 PM8/1/11
to vorax-discuss
Hi guys,

My ex technical architect is an Emacs geek. He can do everything
without touching the mouse. As a vim user, i don't want to learn Emacs
to achieve his profiiency. Vorax is what i'm looking for. Great job
guys !

Simple question/feature request: how is @<file> supported?

UseCase1: I have a sql file called runAsJob.sql. It simple takes a
procedure name and starts a job. The name itself is a parameter. In
sqlplus I'd do "@runAsJob theName". Can i do something similar in
vorax? (without changing direcory, i just start vorax and type a
statement @runAsJob)

Imagine I have a lot of similar scripts. Some are oracle-related, some
other project-related so i don't want them to be in one directory. But
i want to run them as quickly as possible without any overhead (as
mentioned Emacs with Oracle support can do that)

Thanks for a replay,
Lukasz

talek

unread,
Aug 2, 2011, 2:45:22 AM8/2/11
to vorax-discuss
Hi Lukasz,

@<file> is supported in VoraX. It should work with parameters too.
Without specifying the complete path (e.g. @/home/user/runAsJob
theName) the current directory is assumed, at the time
the :VoraxConnect was executed. So, try it and let me know if you have
any problems.

As far as running scripts from various folders you may use the SQLPATH
environment variable to point out to the script folders. In addition
you may also use the NERDTree plugin and execute sql scripts directly
from there.

HTH.

Talek.

vachacz

unread,
Aug 2, 2011, 7:49:48 AM8/2/11
to vorax-discuss
Thanks Talek,

I have installed Vorax on Cygwin.

vim.exe -c "VoraxDbExplorer" -c "VoraxConnect <schema>@<host>"

Promted for password I type the right one and then i get:

Error detected while processing function vorax#Connect..31..10:
line 4:
E117: Unknown function: Eof
E15: Invalid expression: Eof()
Press ENTER or type command to continue

----------------------------
Os: Windows + Cygwin
Vim: 7.3 compiled from sources as you pointed in your Installation
notes.
Ruby: :ruby puts RUBY_VERSION -> 1.8.7
----------------------------

I looked into code:

[ lwachowi@CE03291 ~/.vim ] grep -Ri "EoF()" *
vorax/interface/cygwin/cygwin_if.vim: let content .= Eof()
vorax/interface/unix/unix_if.vim: "silent! ruby
$vorax_if.write(VIM::evaluate('Eof()')

I've commented Eof() line in cygwin_if and than i get:

5 [main] vim 4736 C:\Programy\Cygwin\usr\local\bin\vim.exe: ***
fatal error - unable to remap \\?\C:\Programy\Cygwin\lib\ruby\1.8\i386-
cygwin\etc.so to same address as parent: 0x3E0000 != 0x3F0000
Stack trace:
Frame Function Args
002247F8 6102796B (002247F8, 00000000, 00000000, 00000000)
00224AE8 6102796B (6117EC60, 00008000, 00000000, 61180977)
00225B18 61004F1B (611A7FAC, 6124573C, 003E0000, 003F0000)
End of stack trace
9 [main] vim 1980 fork: child 4736 - died waiting for dll
loading, errno 11

Cannot fork
Error detected while processing function vorax#Connect..
31..10..14..8..15:
line 1:
E484: Can't open file /tmp/vmX8cA0/2
Press ENTER or type command to continue

could you please take a look on that?

vachacz

unread,
Aug 2, 2011, 8:12:10 AM8/2/11
to vorax-discuss
Vorax works !

I fixed remap problam thanks to this article:
http://www.mylifestartingup.com/2009/04/fatal-error-unable-to-remap-to-same.html

EoF() in cyfwin_if.vim is line still commented out.

It would be nice if you could create short Wiki page with all useful
key bindings. I see object tree on the left, but cannot open it :)
I'll figure it out in a minute, but it takes time ...

Anyway, awesome job !

talek

unread,
Aug 2, 2011, 8:36:21 AM8/2/11
to vorax-discuss
Great! Although I must warn you that VoraX on Cygwin is quite slow.
I didn't write a Wiki with key bindings because they are all described
in the documentation and they are all customizable. Please have a look
in doc/vorax.txt.

Have fun!

talek.


On Aug 2, 3:12 pm, vachacz <vach...@gmail.com> wrote:
> Vorax works !
>
> I fixed remap problam thanks to this article:http://www.mylifestartingup.com/2009/04/fatal-error-unable-to-remap-t...

Shaun Batterton

unread,
Aug 2, 2011, 8:35:18 AM8/2/11
to vorax-...@googlegroups.com
Try control-w left arrow to switch window to the left

vachacz

unread,
Aug 2, 2011, 8:55:23 AM8/2/11
to vorax-discuss
Oh, i must have missed this doc file. This is something, what every
potential user will be looking for. I suggest an update on a welcome
page :)

I know it's for vim geeks but had to ask google where should i unzip
an archive. It's very simple and I would write a sentence about it. At
the moment it's "VoraX follows the standard procedure of installing a
Vim plugin". It's true, but when you didn't install any plugins at all
you'll waste time on google. I had to do it :)

I must say, that Vorax works very nice. I don't see any Cygwin
overhead. I'll try to make more complex tests soon and will let you
know if it works.

Thanks for help !
Lukasz

talek

unread,
Aug 2, 2011, 8:09:56 AM8/2/11
to vorax-discuss
Hi,

That's tricky! It's difficult to say whats wrong there. Cygwin
environment, even it's supported, was always slow and kind of buggy
especially because of its PTY emulation on Windows. I strongly
recommend you to use VoraX on Windows without Cygwin.

It might be also a bug therefore I'll have a look to see if I can
reproduce this behavior on my Cygwin.

talek.

talek

unread,
Aug 2, 2011, 9:36:16 AM8/2/11
to vorax-discuss
Good point! I've updated the home page!

vachacz

unread,
Aug 3, 2011, 3:02:48 AM8/3/11
to vorax-discuss
Hi Talek,

Vorax still works very quick. I thinks because of terminal i use. Take
look:

http://code.google.com/p/mintty

If Vorax works better in Minnty also for you, you could recommend it
in documentation.

talek

unread,
Aug 3, 2011, 3:20:44 AM8/3/11
to vorax-discuss
Hi,

Glad to hear that! My tests were on mintty + gnuscreen but maybe I
used an old version of Cygwin. In case you missed them, I have some
posts on VoraX Blog about VoraX running on Cygwin:

http://vorax-ide.blogspot.com/2010/09/how-to-install-vorax-on-cygwin.html
http://vorax-ide.blogspot.com/2010/09/vorax-says-hello-to-cygwin.html

Many thanks for your feedback!

talek.

vachacz

unread,
Aug 3, 2011, 4:21:07 AM8/3/11
to vorax-discuss
Hi,

One more question. I can't get sql local buffer mappings to work.
Global mappings <Leader>vo/vr/vv works fine. But for example
<Leader>ve does not. I can run the query using :VorexExec command.
Maybe i don't understand the idea of sql buffer.

I tried <shift+v> selection or copying the selection to the buffer
<y>. I tried to remap exec commands to other keys and still can't get
it to work. Any idea what could be wrong?

Thanks,
Lukasz

On Aug 3, 9:20 am, talek <alexandru.t...@gmail.com> wrote:
> Hi,
>
> Glad to hear that! My tests were on mintty + gnuscreen but maybe I
> used an old version of Cygwin. In case you missed them, I have some
> posts on VoraX Blog about VoraX running on Cygwin:
>
> http://vorax-ide.blogspot.com/2010/09/how-to-install-vorax-on-cygwin....http://vorax-ide.blogspot.com/2010/09/vorax-says-hello-to-cygwin.html

talek

unread,
Aug 3, 2011, 4:37:34 AM8/3/11
to vorax-discuss
While you're in the sql buffer, what's the output of

:map <buffer>

? Also, ensure you have

filetype plugin on

in your .vimrc file.

On Aug 3, 11:21 am, vachacz <vach...@gmail.com> wrote:
> Hi,
>
> One more question. I can't get sql local buffer mappings to work.
> Global mappings <Leader>vo/vr/vv works fine. But for example
> <Leader>ve does not. I can run the query using :VorexExec command.
> Maybe i don't understand the idea of sql buffer.
>
> I tried <shift+v> selection or copying the selection to the buffer
> <y>. I tried to remap exec commands to other keys and still can't get
> it to work. Any idea what could be wrong?
>
> Thanks,
> Lukasz
>
> On Aug 3, 9:20 am, talek <alexandru.t...@gmail.com> wrote:
>
> > Hi,
>
> > Glad to hear that! My tests were on mintty + gnuscreen but maybe I
> > used an old version of Cygwin. In case you missed them, I have some
> > posts on VoraX Blog about VoraX running on Cygwin:
>
> >http://vorax-ide.blogspot.com/2010/09/how-to-install-vorax-on-cygwin....
>

vachacz

unread,
Aug 3, 2011, 5:13:12 AM8/3/11
to vorax-discuss
In sql editor:

:set ft?
filetype=sql

:map <buffer>
No mappings found.

In object tree view :map <buffer> gives me some results. It means sql
buffer mapping are not registered.

Than I found in vorax_utils.vim where buffer mappings are bind and
i've executed one line in vim:
:nmap <buffer> <Leader>xx :VoraxExecUnderCursor<cr>

Once more:
:map <buffer>
n ,xx @:VoraxExecUnderCursor

So it worked. For me it means, that i can do a simple workaround
in .vimrc, but i still don't know if it's a bug related to my
environment. I'll try to figure out if the method which registers the
mapping is being called. I'll let you know.

Thanks for the tip !

talek

unread,
Aug 3, 2011, 5:20:58 AM8/3/11
to vorax-discuss

vachacz

unread,
Aug 3, 2011, 5:42:44 AM8/3/11
to vorax-discuss
Fixed, the problem was filetype plugin:

filetype plugin on

I had in .vimrc only:

filetype on

it was not enough.
Consider writing some kind of warning/assert when the plugin is not
active, when possible.

I'll add my results to the existing ticket.
Thanks for your time.

Lukasz

On Aug 3, 11:20 am, talek <alexandru.t...@gmail.com> wrote:
> Is this similar to this issue?http://groups.google.com/group/vorax-discuss/t/6fe8b3362f6846b0?hl=en_US

talek

unread,
Aug 3, 2011, 6:10:54 AM8/3/11
to vorax-discuss
Great!

The plugin is active, it's just that without "filetype plugin on", all
vorax scripts under "after/ftplugin/" are not executed therefore no
automatic key-mappings for those buffers. Yes, a warning would be nice
or a statement about this issue within the documentation. I'll take
care of it in VoraX 3.0.

Thanks for suggestion.
Reply all
Reply to author
Forward
0 new messages