[long] Still: Bug?: Vim folding for Ruby broken
Hugh Sasse Staff Elec Eng
hgs at dmu.ac.uk
Thu Nov 18 06:37:47 EST 2004
On Thu, 18 Nov 2004, Kaspar Schiess wrote:
> Hello Hugh,
> It really pains me to misthread messages like that, but as the gmane announce
> shows, this should be the last one to get misthreaded. I excuse for this.
>> OK, I see what your problem is now -- the fold would start at puts
>> instead of starting at the line with do, although it doesn't do this
>> in a class. Although I added folding in the first place to ruby's
>> vim syntax file, I just added it where it looked right, and was
>> unawere of subtleties. I'm fairly sure others have modified it
>> since, but I'm not sure how to track this down...
> I have tried several versions of the ruby.vim file; I have tried on several
> machines. A pattern I see here is the following: Versions that work on unix
> machines don't do it on windows versions of VIM. Could this somehow (insert
> explanation here) be a platform issue ?
I see this -- I get the same folding bug on Windows XP with vim63.
but my unix version seems to have unix line endings...
0000000 2220 5669 6d20 7379 6e74 6178 2066 696c
" V i m s y n t a x f i l
0000020 650a 2220 4c61 6e67 7561 6765 3a09 0952
e \n " L a n g u a g e : \t \t R
0000040 7562 790a 2220 4d61 696e 7461 696e 6572
u b y \n " M a i n t a i n e r
0000060 3a09 0944 6f75 6720 4b65 6172 6e73 0a00
: \t \t D o u g K e a r n s \n
whereas the Windows one is definitely DOS.
> I have used vim62 and vim63, but on windows machines. As one does on windows,
> I have installed vim trough the self-installing executable that can be found
> on www.vim.org.
>> No, mine folds within the methods in the same way in and outside the
>> class [file attached for repeatability] -- this 'cut and paste'ed
>> from a vim window:
> As I was trying to express in my first mail, its not that much about nesting
> of classes, but about nesting of fold-generating constructs in general. Three
But that difference may be significant.
> and below, works, above, does not.
> Wait, one idea here, let me see... I had the set fdl=1 setting suspected of
> triggering a vim bug (explaining the different behaviour connected to nest
> depth), but no. I just disabled the setting, and it did not work. Makes me
> think, perhaps you are interested in some parts of my vimrc:
I've not used fdl in my files.
> " Enable folding
> set fen " folding enabled
> set fdl=1 " fold at level > 2
> set fdc=5 " fold column width
> set fdm=syntax " fold method: syntax
but apart from that (fdl) I'm basically using the same settings.
>> And I don't understand why yours is showing + instead of - for open folds.
> That is my manual simulation of vim behaviour...
Oh, I see.
> I am even more at loss with this problem that I was some days ago; I can't
> see why this should be a bug of ruby.vim. I'd probably better to a vim
> mailing list... ?
You may need to do that, but we'll see if this sparks off something
from someone else first.
> best regards,
More information about the vim-ruby-devel