[patch] vim syntax file patch

16 views
Skip to first unread message

Cornelius

unread,
Dec 15, 2009, 8:11:29 AM12/15/09
to vim_dev
Hi folks,

I found that VimL syntax doesnt fold for something like:

fun! g:Test()

endf

it folds for :

fun! g:Test.ok()

endf

so this is a patch of fixing the global function folding and my test code.



--
Best Regards.

Cornelius ( Yo-An Lin )
E-mail: corneli...@gmail.com
http://c9s.blogspot.com/

vim-syntax.patch
test.vim

c9s

unread,
Dec 17, 2009, 10:13:01 PM12/17/09
to vim_dev
any comment ?

On Dec 15, 9:11 pm, Cornelius <cornelius.h...@gmail.com> wrote:
> Hi folks,
>
> I found that VimL syntax doesnt fold for something like:
>
> fun! g:Test()
>
> endf
>
> it folds for :
>
> fun! g:Test.ok()
>
> endf
>
> so this is a patch of fixing the global function folding and my test code.
>
> --
> Best Regards.
>
> Cornelius ( Yo-An Lin )

> E-mail: cornelius.h...@gmail.comhttp://c9s.blogspot.com/
>
>  vim-syntax.patch
> 1KViewDownload
>
>  test.vim
> < 1KViewDownload

Charles Campbell

unread,
Dec 18, 2009, 8:59:43 AM12/18/09
to vim...@googlegroups.com
c9s wrote:
> any comment ?
>
> On Dec 15, 9:11 pm, Cornelius <cornelius.h...@gmail.com> wrote:
>
>> Hi folks,
>>
>> I found that VimL syntax doesnt fold for something like:
>>
>> fun! g:Test()
>>
>> endf
>>
>> it folds for :
>>
>> fun! g:Test.ok()
>>
>> endf
>>
>> so this is a patch of fixing the global function folding and my test code.
>>
Try using vim 7.2-95, available at my website since Nov 18 -- I didn't
see any problem with its folding with the example you gave above.

http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax

Regards,
Chip Campbell

Cornelius

unread,
Dec 29, 2009, 1:17:50 PM12/29/09
to vim...@googlegroups.com
On Fri, Dec 18, 2009 at 9:59 PM, Charles Campbell <Charles.E...@nasa.gov> wrote:
Try using vim 7.2-95, available at my website since Nov 18  --  I didn't
see any problem with its folding with the example you gave above.

Hi , I am using 

% vim --version 
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 21 2009 10:39:32)
MacOS X (unix) version
Included patches: 1-315

i think it's 7.2-315

but it doesnt fold for this: 

fun! g:Test()

endf

or:

fun! g:test_foo()

endf


As the attachment, see the foldcolumn.




 
--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php



--
Best Regards.

Cornelius ( Yo-An Lin )
E-mail: corneli...@gmail.com
http://c9s.blogspot.com/

Screen shot 2009-12-30 at 2.13.19 AM.png

Ben Fritz

unread,
Dec 30, 2009, 11:50:06 AM12/30/09
to vim_dev

On Dec 29, 12:17 pm, Cornelius <cornelius.h...@gmail.com> wrote:
> On Fri, Dec 18, 2009 at 9:59 PM, Charles Campbell <
>

> Charles.E.Campb...@nasa.gov> wrote:
> > Try using vim 7.2-95, available at my website since Nov 18  --  I didn't
> > see any problem with its folding with the example you gave above.
>
> Hi , I am using
>
> % vim --version
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Dec 21 2009 10:39:32)
> MacOS X (unix) version
> Included patches: 1-315
>
> i think it's 7.2-315
>
> but it doesnt fold for this:
>
> fun! g:Test()
>
> endf
>
> or:
>
> fun! g:test_foo()
>
> endf
>

I do NOT see this problem, using the 7.2-93 version of the Vim *syntax
script*. I found this version info by looking at the header comment of
$VIMRUNTIME/syntax/vim.vim.

When I paste your code into a new Vim session and :set ft=vim, both
function snippets shown above fold as expected, although the
g:test_foo is highlighted as a VimFunctionError.

My Vim version is 7.2.320, running on Windows.

Cornelius

unread,
Dec 30, 2009, 9:48:52 PM12/30/09
to vim...@googlegroups.com
Thanks.

I got the version info from my $vimruntime/syntax/vim.vim

seems my version is older.


--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply all
Reply to author
Forward
0 new messages