Felix Gallo | 29 Apr 21:08
Picon

rubycomplete unusual gem behavior?

system: ubuntu linux 10.10
ruby: 1.9.2p180 manually compiled from source
vim: 7.3 manually compiled from source with +ruby option enabled
vim-ruby: latest installed, plus the 0.9 rubycomplete version from the
rubycomplete_updates branch.

$ vi x.rb
#!/usr/local/bin/ruby

x = String.new

x.^X^O  -> many correct methods found
^[:q!

$ sudo gem install redis
Successfully installed redis-2.2.0
1 gem installed
Installing ri documentation for redis-2.2.0...
Installing RDoc documentation for redis-2.2.0...

$ vi y.rb
#!/usr/local/bin/ruby
require 'redis'

x = Redis.new

x.^X^O  -> no methods found

Note that

(Continue reading)

Doug Kearns | 4 Jan 17:32
Picon

Abandoning Rubyforge

Does anyone have any objections to abandoning the RubyForge project, other than
redirects, for GitHub?  While it seems RubyForge now pretty much provides all
the things that motivated the partial move to GitHub in the first place it's,
likewise, apparent that GitHub now provides most of the features that were
required from RubyForge.

I'm indifferent to which site to use but it doesn't make sense using both
anymore.

Regards,
Doug
Jarmo | 25 Dec 18:44
Picon
Gravatar

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
_______________________________________________
vim-ruby-devel mailing list
vim-ruby-devel <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Steve Horn | 31 Oct 03:19

gvim editing ruby on Windows

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 #<Mutex:0x4019cc0>
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
Nikolai Weibull | 26 Oct 18:49
Picon
Gravatar

Syntax highlighting of multiple here documents

p <<EOE, <<EOA
abc
EOE
def
EOA

isn’t highlighted correctly.  I can’t think of a way to good fix this
off the top of my head, but I guess one solution would be to allow for
here documents to match inside here documents, or match the last one
on a line (which I don’t think you can tell Vim to do).

Anyway, thought I’d mention it.  Also, I’m planning on upgrading the
indentation definition, but I’m not making any promises.
_______________________________________________
vim-ruby-devel mailing list
vim-ruby-devel <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Gavin Sinclair | 16 Sep 06:50
Picon
Gravatar

Fwd: Error by opening a ruby file with gvim 7.3.5

Hi folks,

Any thoughts on this problem that's been reported to me?

Gavin

---------- Forwarded message ----------
From: Cesar Romani <cesar.romani <at> gmail.com>
Date: Thu, Sep 16, 2010 at 12:42 AM
Subject: Error by opening a ruby file with gvim 7.3.5
To: gsinclair <at> gmail.com

Dear Gavin,
I'm using the latest release of vim, 7.3.5 compiled with MinGW on Win XP
with ruby support, version 1.9.1-p378-rc2
If I open whatever ruby file, I get the following error messages:

--------------------
Error detected while processing C:\Programmi\Vim\vim73\ftplugin\ruby.vim:
line   76:
NoMethodError: undefined method `synchronize' for #<Mutex:0xfeb520>
line   93:
E121: Undefined variable: s:ruby_path
E15: Invalid expression: s:ruby_path
--------------------

Best regards,

Cesar

--
Cesar
Doug Kearns | 1 Sep 20:23
Picon

Last Change headers

Does anyone have any thoughts on the best fix for this irritation?

Is it worth doing some sort of keyword expansion with smudge/clean filters?  I
think export-subst leaves $Format: ...$.  Perhaps a Vim specific release script
is the simplest approach since it only happens once every few years.

Nikolai, what are you using for your Vim scripts?  I notice you're going it
alone with a somewhat unique "Latest Revision" header.  How's that generated?

Doug
Doug Kearns | 31 Aug 20:41
Picon

Worth supporting 1.9 conditionally?

G'day all,

I was just going to add some missing 1.9 syntax items and was curious
if anyone had strong feelings, either way, regarding configurable 1.9
support.

Thanks,
Doug
Doug Kearns | 27 May 14:23
Picon

Last Change headers

G'day folks,

I was just about to fire off the runtime files to Bram for inclusion
in 7.3 when I noticed that we seem to have lost our "Last Change"
header lines from these files.  It looks like they were replaced with
CVS Id keywords at some time and these were then removed when we moved
to git.

Would anyone have any objection to these lines being added?  I suspect
I'll be having this discussion with Bram otherwise...

Doug
Scott LaBounty | 21 May 15:21

% Matching With Vim/Ruby

All,

 

Not sure if this is the right list or not, but I’m trying to get matching to work (using %) in vim in a ruby file. For example if I have the following code:

 

1.upto(10) do |n|

    puts n

end

 

If the cursor is on the “do”, I’d like to hit the “%” key and have it go to “end”.

 

I have the following in an .vim/after/ftplugin/ruby.vim

 

if exists("loaded_matchit")

    if !exists("b:match_words")

        let b:match_ignorecase = 0

        let b:match_words =

                    \ '\%(\%(\%(^\|[;=]\)\s*\)\ <at> <=\%(class\|module\|while\|begin\|until\|for\|if\|unless\|def\|case\)\|\<do\)\>:' .

                    \ '\<\%(else\|elsif\|ensure\|rescue\|when\)\>:\%(^\|[^.]\)\ <at> <=\<end\>'

    endif

endif

 

 

which is what I had in an older system. I believe that matchit.vim is loaded already (by default).

 

Any ideas on getting this to work or alternative ways of doing this?

 

Scott


Confidentiality Statement:
This message is confidential and may contain confidential information it is intended only for the individual[s] named herein. If this message is being sent from a member of the legal department, it may also be legally privileged. If you are not the named addressee[s] you must delete this email immediately; do not disseminate, distribute or copy.
_______________________________________________
vim-ruby-devel mailing list
vim-ruby-devel <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Morita Sho | 11 Sep 22:17
Picon

Some regexp pattern breaks the syntax highlighting.

Hi,

Some regexp pattern breaks the syntax highlighting.

How to reproduce the problem:

First of all, create a ruby script as following and open it with Vim.

% cat test.rb
func /\(/
puts

At this point, the script will be highlighted correctly.
Then, hit Ctrl-E to scroll down the window (the line "func /\(/" goes
out of the screen), and hit Ctrl-L to redraw. After redrawing the window,
the line "puts" will be highlighted wrongly as a regexp literal.

It seems that the highlighting works if the line "func /\(/" is visible,
but won't work if the line "func /\(/" is out of the screen.

I tested latest syntax/ruby.vim pulled from git repository, but it doesn't
solve the problem.

Thanks,
--

-- 
Morita Sho <morita-pub-en <at> inz.sakura.ne.jp>

Gmane