Up until last week, I had been using RubyMine for my Rails development. I know it has a vim plugin but I have been working on migrating my development to vim and tmux. I don't want to keep using the mouse and VIM gives me a lot more flexibility. I have found plugins and workarounds for almost all the features I care about except the "interpreted auto complete" functionality in my first screenshot below. RubyMine interprets the whole rails application and offers sorted-by-relevance suggestions (as you can see, it's showing me instance variables and methods for the class in question and the modules it includes) THEN it shows (less relevant) methods available on the Object class. It also shows the method signature when there's one.
Also, in my second screenshot, you can see how RubyMine offers autocompletion for core Ruby classes.
Compare this to the bottommost screenshot. I do have completion but there's no way to find what I'm looking for. I'm using ctags , YouCompleteMe, vim-rails, vim-ruby and I also tried installing eclim to see if it makes a difference.
Is there a plugin I've missed that can enhance my auto completion? It doesn't look like RubyMine is doing something super crazy. pry can give me the same 'power' if it were running in the same 'context'.
First Screenshot (RubyMine interpreted auto complete):

Second Screenshot (RubyMine core Ruby classes auto complete):

Third Screenshot (vim omnifunc + ctags):

Important Note This solution only works for Ruby 1.9+
I forked 'vim-ruby' at https://github.com/zxiest/vim-ruby and modified it as such:
Plugins and Settings
vim-rails I'm using vim-rails https://github.com/tpope/vim-rails
supertab I'm using supertab https://github.com/ervandew/supertab instead of
YouCompleteMe(mentioned in my question) althoughYouCompleteMeis super fast and automatic but there are currently some compatibility issues between my it and myvim-rubyfork.vim-easytags I'm using vim-easytags https://github.com/xolox/vim-easytags
Add this to your
~/.vimrcMake sure to
touch ./tagsin your project directory.Issue
:UpdateTags -R **/*.*from vim in order for easytags to generate your tags file.Remap omnicomplete
In order for
omnicompleteto pop up, by default, we have to hit<C-X><C-O>. I remapped this to<C-Space>by inserting the following in my~/.vimrc:inoremap <C-@> <C-x><C-o>I now press
tabwhen I want supertab to complete my code andCtrl+Spacewhen I want omnicomplete to trigger and show method signatures for me. There's definitely a better way to integrate this (i.e. getting supertab to call omnicomplete after a dot)And here goes the screenshot! Notice that method sorting being off allowed my custom
resizemethod to appear on top and the signatures now appear in the completion (as well as in the editor when enter is pressed!)