Updated at: May 22, 2017
Vorax, an Oracle IDE for Geeks, I spent a good amount of time to set up this Vim plugin on my desktop.
My Environment:
cd ~/.vim_runtime
git clone git@github.com:talek/vorax4.git sources_non_forked/vorax4
Since ubuntu system ruby (sudo apt install ruby
), general version is 2.2 or 2.3
I use rvm to manage different versions of ruby.
While rvm bascily support bash/zsh, to utilize it in fish, I need a utility oh-my-fish.
With omf(oh-my-fish), install rvm plugin omf install rvm
Use ruby 1.9.3 as default,
rvm install 1.9.3
rvm use --default 1.9.3
# check if works
ruby -v
sudo apt install mercurial
# get vim source http://www.vim.org/mercurial.php
hg clone https://bitbucket.org/vim-mirror/vim
# configure & compile
cd vim
./configure --with-features=HUGE \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib/python2.7/config/ \
--enable-multibyte=yes \
--enable-cscope=yes \
--enable-rubyinterp=yes \
--with-ruby-command=<your ruby path, '$which ruby'> \
--enable-gui=gnome2 \
--with-x \
--enable-fontset
make
sudo make install
On it’s wiki, gem install vorax
to solve gem dependencies, vorax is a dummy gem which contains 4 gems.
Since one of 4 gems, sdsykes-ferret was not maintained by owner anymore. So …
# nokogiri require ruby >= 2.1, so you need to specify a history version
gem install nokogiri -v 1.6.8 --no-rdoc --no-ri
gem install childprocess --no-rdoc --no-ri
gem install rubytree --no-rdoc --no-ri
gem install ferret --no-rdoc --no-ri # instead of sdsykes-ferret
ensure that you have oralce client installed (include sqlplus)
If you install 64bit sqlplus, sqlplus64
, you need to modify source ruby code of vorax plugin
In my case, .vim_runtime/sources_non_forked/vorax4/vorax/ruby/lib/vorax/sqlplus.rb
, change sqlplus to sqlplus64
def initialize(bin_file = "sqlplus64")
@bin_file = bin_file
open vim, connect to a oracle instance :VORAXConnect scott/tiger@db
open database explorer, <Leader>ve
what’ my
? it's "\" by default, you can check with `:echo mapleader`, it's "," in my case
execute statementss, <Leader>e
open SQL Scratch <Leader>ss
output window, https://github.com/talek/vorax4/wiki/The-Output-Window