omni-completion refresh

Hi!
I've finally got Ruby code completion working sort of, but not as i'd really
like it. Currently it doesn't show the new methods added to some class if
code-completion has already used. For example, if i have files like these:
# a.rb
class A
def my_method
end
end
# b.rb
require "a"
a = A.new
a. # <C-x><C-o> will show my_method
Now if i open a.rb in a separate buffer and add some new method and save the
file then again in the b-buffer omni-completion doesn't show the newly added
method. I have to restart vim to make it show me the new method too. Is it
possible to make vim reload the omni-completion data?
In my vimrc i have currently these lines:
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
Also, when i use modules then the omni-completion doesn't seem to work at
all - even if i restart vim:
# a.rb
module MyModule
class MyClass
def my_method
end
end
end
# b.rb
MyM #<C-x><C-o> shows no matches
MyModule::MyC #<C-x><C-o> shows no matches
a = MyModule::MyClass.new
a. #<C-x><C-o> shows no matches
To conclude i have two problems:
1) how to refresh omni-completion data?
2) how to make omni-completion work with module namespaces?
I'm relatively new to vim so please apologize for my ignorance.
Jarmo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20101225/4f43d343/attachment.html>