On Dec 25, 1:30 pm, Dasn <[EMAIL PROTECTED]> wrote:
> Hi, list.
>
> The command:
> :so $VIMRUNTIME/ftplugin/man.vim
> :Man 3 gets
>
> And the command on my box returns the following section:
>
> ------------- %< ------------
> NAME
> fgets, gets - get a line from a stream
>
> SYNOPSIS
> #include <stdio.h>
>
> char *
> fgets(char *str, int size, FILE *stream);
>
> char *
> gets(char *str);
>
> DESCRIPTION
> The fgets() function reads at most size-1 characters from the given
> stream and stores them in the string str. Reading stops when a newline
>
> ------------- %< ------------
>
> Note, the 'DESCRIPTION' is not highlighted.
>
> In the 'man.vim' syntax file, I found:
> 'end="^\u\+\s*$"he=e-12'
>
> I wonder why the number 12 is used here?
Because it is assumed, that the 'SYNOPSIS' paragraph is followed
by the 'DESCRIPTION' paragraph, but the manSynopsis syntax region
is supposed to highlight the text between this keywords.
strlen("DESCRIPTION\n") = 12
strlen("SYNOPSIS") = 8
-ap
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---