s:rubypath in ftplugin/ruby.vim

Tim Pope vim-ruby-devel at tpope.info
Tue Jan 23 14:32:39 EST 2007

On Tue, Jan 23, 2007 at 10:45:16AM -0600, Tim Pope wrote:
> Things work fine if you :ruby require the same libraries manually, and
> things still break if all rails.vim does is require the same
> libraries.  Perhaps is has something to do with how things are nested
> in a Vim function.  I will investigate further.

A little further investigation reveals the trigger.  The first time
the Ruby interface is used is significant.  If it is used at the top
level, all is well.  If it is nested deep inside several function
calls, this seems to reduce the available stack space to Ruby.  Note
that only there very first call is relevant.  If I add

silent! ruby nil

to the plugin initialization function of rails.vim (so that the call
is nested just one function deep), everything works great.  I'm not
thrilled with forcing initialization at each start but I can't find a
better place to do it.

This does not help my segfaulting acquaintance (whom I wlll hereafter
refer to as jsunn) though.  I still think use of the interface in the
ftplugin should be limited to Windows.



More information about the vim-ruby-devel mailing list