Rodolfo Borges wrote:
> When opening a valgrind output file, the syntax highlighting was not
> being automatically turned on.
> I found that on scripts.vim it's checking for 'valgrind' on the first
> line, but my version of valgrind (3.2.1 ) prints 'Memcheck' instead.
> So I fixed it adding the second elseif bellow:
>
> " Valgrind
> elseif s:line1 =~ '^==\d\+== valgrind'
> set ft=valgrind
> elseif s:line1 =~ '^==\d\+== Memcheck'
> set ft=valgrind
>
> Maybe this should be included on Vim distribution?
Memcheck is not valgrind, right? Or is the format exactly the same?
One example I found starts with:
==16418== Memcheck, a memory error detector for x86-linux.
==16418== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==16418== Using valgrind-2.1.2, a program supervision framework for x86-linux.
==16418== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==16418== For more details, rerun with: -v
==16418==
So perhaps we should check for "Using valgrind" in the third line? Or
is it possible that the header looks different?
--
'Well, here's something to occupy you and keep your mind off things.'
'It won't work, I have an exceptionally large mind.'
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///