From now at bitwi.se Tue Oct 26 12:49:53 2010 From: now at bitwi.se (Nikolai Weibull) Date: Tue, 26 Oct 2010 18:49:53 +0200 Subject: Syntax highlighting of multiple here documents Message-ID: p < When I try to edit an existing or create a new ruby file with gvim on Windows I get the following error: ---- Error detected while processing C:\Program Files (x86)\Vim\vim73\ftplugin\ruby.vim line 76: NoMethodError: undefined method 'synchronize' for # line 93: E121: Undefined variable: s:ruby_path E15: Invalid expression: s:ruby_path Any idea what I might be doing wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From vim-ruby-devel at tpope.info Sun Oct 31 10:46:48 2010 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Sun, 31 Oct 2010 10:46:48 -0400 Subject: gvim editing ruby on Windows In-Reply-To: References: Message-ID: Probably a Ruby 1.9 thing. What does `:ruby p RUBY_VERSION` output? I know there's issues with the omnicomplete plugin. This is the first I've heard of with just the ftplugin. On Sat, Oct 30, 2010 at 10:19 PM, Steve Horn wrote: > When I try to edit an existing or create a new ruby file with gvim on > Windows I get the following error: > ---- > Error detected while processing C:\Program Files > (x86)\Vim\vim73\ftplugin\ruby.vim > line 76: > NoMethodError: undefined method 'synchronize' for # > line 93: > E121: Undefined variable: s:ruby_path > E15: Invalid expression: s:ruby_path > > Any idea what I might be doing wrong? > > > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve at stevehorn.cc Sun Oct 31 13:47:56 2010 From: steve at stevehorn.cc (Steve Horn) Date: Sun, 31 Oct 2010 13:47:56 -0400 Subject: gvim editing ruby on Windows In-Reply-To: References: Message-ID: Had ruby 1.8.7 installed along with 1.9.1. Un-installed both and installed 1.9.2 and the error has gone away. On Oct 31, 2010 11:40 AM, "Tim Pope" wrote: > Probably a Ruby 1.9 thing. What does `:ruby p RUBY_VERSION` output? > > I know there's issues with the omnicomplete plugin. This is the first I've > heard of with just the ftplugin. > > On Sat, Oct 30, 2010 at 10:19 PM, Steve Horn wrote: > >> When I try to edit an existing or create a new ruby file with gvim on >> Windows I get the following error: >> ---- >> Error detected while processing C:\Program Files >> (x86)\Vim\vim73\ftplugin\ruby.vim >> line 76: >> NoMethodError: undefined method 'synchronize' for # >> line 93: >> E121: Undefined variable: s:ruby_path >> E15: Invalid expression: s:ruby_path >> >> Any idea what I might be doing wrong? >> >> >> _______________________________________________ >> vim-ruby-devel mailing list >> vim-ruby-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/vim-ruby-devel >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarmo.p at gmail.com Sat Dec 25 12:44:35 2010 From: jarmo.p at gmail.com (Jarmo) Date: Sat, 25 Dec 2010 19:44:35 +0200 Subject: omni-completion refresh Message-ID: 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. # 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 # shows no matches MyModule::MyC # shows no matches a = MyModule::MyClass.new a. # 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: From jarmo.p at gmail.com Sun Dec 26 00:58:03 2010 From: jarmo.p at gmail.com (Jarmo) Date: Sun, 26 Dec 2010 07:58:03 +0200 Subject: omni-completion refresh In-Reply-To: References: Message-ID: Hi! Let me add some new findings about omni-completion when modules are in use. Even the following snippet will show "pattern not found": module A class B def c end end end a = A::B.new a.# By setting @@debug to true in rubycomplete.vim i see these messages when trying to complete for the first time: input a. variable load_buffer_class(a) START vartype A::B load_buffer_class(A::B) START load_buffer_class err: (eval):1:in `get_completions': uninitialized constant VimRubyCompletion::A For some reason module A is not eval'ed to create the constant. In load_buffer_class the line: classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') returns nil. Is there any better way to debug the Ruby code within rubycomplete.vim than with those dprint() statements? Any chance to use ruby-debug there somehow? Should the code completion even work with today's Ruby? I can see from the github history that there hasn't been much of an action lately with rubycomplete.vim, but that could mean anything of course. Jarmo On Sat, Dec 25, 2010 at 7:44 PM, Jarmo wrote: > 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. # 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 # shows no matches > MyModule::MyC # shows no matches > a = MyModule::MyClass.new > a. # 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: