Re: syntax/man.vim: manSubHeading is a bit too general?

2007-04-09 Thread Nikolai Weibull

On 4/10/07, Yakov Lerner <[EMAIL PROTECTED]> wrote:

On 4/9/07, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
> The manSubHeading is defined as
>
> syn match  manSubHeading  "^\s\{3\}[a-z][a-z ]*[a-z]$"
>
> This will, however, match more lines than I think is intended.  It
> will, for example, match the line
>
> \t  returns are what are recorded and compared with the data git keeps
>
> where "\t" is a horizontal tabulation.

I never saw tabs in the formatted manpages. Did you ever
see tabs in the formatted manpages ? I think it contains only spaces.


Not in my tool chain; I get tabs.

 nikolai


Re: Understanding regxp implementation

2007-03-19 Thread Nikolai Weibull

On 3/19/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:

Nikolai Weibull wrote:

> On 1/1/07, Asiri Rathnayake <[EMAIL PROTECTED]> wrote:
>
>> On Mon, 2007-03-19 at 11:55 +0100, Nikolai Weibull wrote:
>> > On 3/19/07, Asiri Rathnayake <[EMAIL PROTECTED]> wrote:
>> > > Hi Bram, Nicolai,
>> >
>> > A 'k' would be greatly appreciated.
>>
>> I'm really really sorry, won't happen again...
>
> Hehe, don't take it too hard, it happens to me all the time.  If I had
> a dime for every misspelling of my name, I'd have...more money than I
> do now.

Perhaps this will help:

   /  -,,, ,,
  ||   )  ' || ||   _'
 ~||---) \\ ||/\  /'\\ ||  < \, \\
 ~||---, || ||_< || || ||  /-|| ||
 ~||  /  || || | || || || (( || ||
  |, /   \\ \\,\ \\,/  \\  \/\\ \\
-_-  --~


My eyes, they burn!  ;-)

 nikolai


Re: VimL and Exuberant tags - Suggestions please

2006-10-13 Thread Nikolai Weibull

On 10/13/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote:

On 10/13/06, Martin Krischik <[EMAIL PROTECTED]> wrote:

> The ctags Patch list list [1] not been worked on for ages.

I wonder why no one has taken over development/forked this project
yet.  It seems obvious that the current maintainer has given up
interest.


Hm, I take that back.  It seems like development hasn't stopped
completely, as the last update was done in May, 2006.  It was
mentioned earlier on this list that the lead developer had stopped
working on exuberant-ctags.  Maybe he's back?

 nikolai


Re: VimL and Exuberant tags - Suggestions please

2006-10-13 Thread Nikolai Weibull

On 10/13/06, Martin Krischik <[EMAIL PROTECTED]> wrote:


The ctags Patch list list [1] not been worked on for ages.


I wonder why no one has taken over development/forked this project
yet.  It seems obvious that the current maintainer has given up
interest.

 nikolai


Re: [Vim] Ada language Mode.

2006-10-08 Thread Nikolai Weibull

On 10/8/06, Martin Krischik <[EMAIL PROTECTED]> wrote:

Hello,

I have created a new language mode for Ada [1] and would like anybody who
interested in Ada and Vim to comment on.


I'm not interested in the slightest, but I'll comment anyway.

Here's how to get your additions into the main Vim release:

Please get in contact with the current maintainer(s) of the file(s)
you intend to replace.  They'll either give maintainership to you, or
they'll integrate your additions into their file(s).  As it sounds
like you've maid considerable additions to the language mode, I'll
assume that they'll be glad to give you maintainership of the files.

Anyway, when that's been decided, get the maintainer(s) to contact
Bram to notify him of the changes in maintainership and send along the
new files.

 nikolai


Re: different format of features in :version

2006-08-15 Thread Nikolai Weibull

On 8/15/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:

I want to suggest different format of features listing in output of :version.


There's always the possibility of adding a :version! alternative.

 nikolai


Re: has anybody done syntax highlighting for linux Kconfig files ?

2006-04-13 Thread Nikolai Weibull
On 4/13/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:

> > OK, this and some syncing issues has been fixed.
>
> Hi Nikolai,
> Thanks for a great job. The apostrophe in helptexts mostly works.
> I found two cases though where it does not work (see below),
> Also, when helptext with apostrophe is top line of the
> screen, all screen is painted same color (probably a syncing issue).

Hm, forgot to add syncing to the light version.  I added the following:

syn syncmatch kconfigSyncHelp grouphere kconfigHelpText
'help\|---help---'

I hope that's how you use the 'syn sync ... grouphere' syntax...

It seems to work anyway.

Peace.

  nikolai
" Vim syntax file
" Maintainer:   Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision:  2006-04-13

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

if exists("g:kconfig_syntax_heavy")

syn match   kconfigBegin  '^' nextgroup=kconfigKeyword
  \ skipwhite

syn keyword kconfigTodo   contained TODO FIXME XXX NOTE

syn match   kconfigCommentdisplay '#.*$' contains=kconfigTodo

syn keyword kconfigKeywordconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordmenuconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordcomment menu mainmenu
  \ nextgroup=kconfigKeywordPrompt
  \ skipwhite

syn keyword kconfigKeywordchoice
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn keyword kconfigKeywordendmenu endchoice

syn keyword kconfigPreProcsource
  \ nextgroup=kconfigPath
  \ skipwhite

" TODO: This is a hack.  The who .*Expr stuff should really be generated so
" that we can reuse it for various nextgroups.
syn keyword kconfigConditionalif endif
  \ [EMAIL PROTECTED]
  \ skipwhite

syn match   kconfigKeywordPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn match   kconfigPath   '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
  \ contained

syn match   kconfigSymbol '\<\k\+\>'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

" FIXME: There is – probably – no reason to cluster these instead of just
" defining them in the same group.
syn cluster kconfigConfigOptions  contains=kconfigTypeDefinition,
  \kconfigInputPrompt,
  \kconfigDefaultValue,
  \kconfigDependencies,
  \kconfigReverseDependencies,
  \kconfigNumericalRanges,
  \kconfigHelpText,
  \kconfigDefBool,
  \kconfigOptional

syn keyword kconfigTypeDefinition bool boolean tristate string hex int
  \ contained
  \ nextgroup=kconfigTypeDefPrompt,
  \   @kconfigConfigOptions
  \ skipwhite skipnl

syn match   kconfigTypeDefPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ contained
  \ nextgroup=kconfigConfigOptionIf,
  \   @kconfigConfigOptions
  \ skipwhite skipnl

syn match   kconfigTypeDefPrompt  "'[^'\\]*\%(\\.[^'\\]*\)*'"
  \ contained
  \ nextgroup=kconfigConfigOptionIf,
  \   @kconfigConfigOptions
  \ skipwhite skipnl

syn keyword kconfigInputPromptprompt
  \ contained
  \ nextgroup=kconfigPromptPrompt
   

Re: has anybody done syntax highlighting for linux Kconfig files ?

2006-04-12 Thread Nikolai Weibull
On 4/12/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> On 4/11/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
> > On 4/11/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > > On 4/11/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
> > > > As per your request, here's a syntax/kconfig.vim.
> > >
> > > Nice job Nikolai, thanks.
> > > I went though all 2.6 Kconfig files and noticed some mishighlightings.
> > > I extracted them into the attchment, which see (with :set ft=kconfig').
> > >
> > > Another issue that I noticed:
> > > when scrolling backward (PgUp) on large Kconfig file,
> > > I get  many many unhighlighted lines, sometimes
> > > half-screen of them, which get highlighted when I do Ctrl-L.
> >
> here's a slightly updated version to fix some of the issues
> > that you found.  Most of them are due to the line-continuation
> > directive /\\$/ which causes a lot of extra work to deal with
> > correctly (it can be basically anywhere, which makes it hard to retain
> > the state we try to keep), and comments, which could be made into a
> > command and thus most of the problems would go away, but never all of
> > them.
> >
> > As a solution I've made a "light" version of the kconfig syntax to use
> > as a default.  The "heavy" one previously defined can be enabled by
> >
> > :let g:kconfig_syntax_heavy = 1
>
> Light version suffers from this big problem: the apostrophe in help text
> scrambles highlighting for many following paragpaphs
> (like "won't" ). Heavy version doesn't suffer from this problem.
>
> Both in light and in heavy version: keywords (if, source )
> are highlighted in help texts. Keywords probably shall not be highlighted
> in help texts.

OK, this and some syncing issues has been fixed.

Here's a probably final version.

Peace.

  nikolai
" Vim syntax file
" Maintainer:   Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision:  2006-04-12

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

if exists("g:kconfig_syntax_heavy")

syn match   kconfigBegin  '^' nextgroup=kconfigKeyword
  \ skipwhite

syn keyword kconfigTodo   contained TODO FIXME XXX NOTE

syn match   kconfigCommentdisplay '#.*$' contains=kconfigTodo

syn keyword kconfigKeywordconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordmenuconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordcomment menu mainmenu
  \ nextgroup=kconfigKeywordPrompt
  \ skipwhite

syn keyword kconfigKeywordchoice
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn keyword kconfigKeywordendmenu endchoice

syn keyword kconfigPreProcsource
  \ nextgroup=kconfigPath
  \ skipwhite

" TODO: This is a hack.  The who .*Expr stuff should really be generated so
" that we can reuse it for various nextgroups.
syn keyword kconfigConditionalif endif
  \ [EMAIL PROTECTED]
  \ skipwhite

syn match   kconfigKeywordPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn match   kconfigPath   '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
  \ contained

syn match   kconfigSymbol '\<\k\+\>'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

" FIXME: There is – probably – no reason to cluster these instead of just
" defining them in the same group.
syn cluster kconfigConfigOptions  contains=kconfigTypeDefinition,
  \kconfigInputPrompt,
  \kconfigDefaultValue,
  \kconfigDependencies,
  \kconfigReverseDependencies,
  \kconfigNumericalRanges,
  \kconfigHelpText,
  

Re: has anybody done syntax highlighting for linux Kconfig files ?

2006-04-11 Thread Nikolai Weibull
On 4/11/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> On 4/11/06, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
> > As per your request, here's a syntax/kconfig.vim.
>
> Nice job Nikolai, thanks.
> I went though all 2.6 Kconfig files and noticed some mishighlightings.
> I extracted them into the attchment, which see (with :set ft=kconfig').
>
> Another issue that I noticed:
> when scrolling backward (PgUp) on large Kconfig file,
> I get  many many unhighlighted lines, sometimes
> half-screen of them, which get highlighted when I do Ctrl-L.
> Maybe 'syn sync' values shall be adjusted
> (screen height was ~ 50, i it's relevant) ?

Hm, yes, there should probably be some syncing in there.  In the
meantime, here's a slightly updated version to fix some of the issues
that you found.  Most of them are due to the line-continuation
directive /\\$/ which causes a lot of extra work to deal with
correctly (it can be basically anywhere, which makes it hard to retain
the state we try to keep), and comments, which could be made into a
command and thus most of the problems would go away, but never all of
them.

As a solution I've made a "light" version of the kconfig syntax to use
as a default.  The "heavy" one previously defined can be enabled by

:let g:kconfig_syntax_heavy = 1

If you could be so kind as to give the light version of the syntax a
try and see if it works just as well as the heavy I'd be happy.

Peace.

  nikolai
" Vim syntax file
" Maintainer:   Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision:  2006-04-11

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

if exists("g:kconfig_syntax_heavy")

syn match   kconfigBegin  '^' nextgroup=kconfigKeyword
  \ skipwhite

syn keyword kconfigTodo   contained TODO FIXME XXX NOTE

syn match   kconfigCommentdisplay '#.*$' contains=kconfigTodo

syn keyword kconfigKeywordconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordmenuconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordcomment menu mainmenu
  \ nextgroup=kconfigKeywordPrompt
  \ skipwhite

syn keyword kconfigKeywordchoice
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn keyword kconfigKeywordendmenu endchoice

syn keyword kconfigPreProcsource
  \ nextgroup=kconfigPath
  \ skipwhite

" TODO: This is a hack.  The who .*Expr stuff should really be generated so
" that we can reuse it for various nextgroups.
syn keyword kconfigConditionalif endif
  \ [EMAIL PROTECTED]
  \ skipwhite

syn match   kconfigKeywordPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn match   kconfigPath   '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
  \ contained

syn match   kconfigSymbol '\<\k\+\>'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

" FIXME: There is – probably – no reason to cluster these instead of just
" defining them in the same group.
syn cluster kconfigConfigOptions  contains=kconfigTypeDefinition,
  \kconfigInputPrompt,
  \kconfigDefaultValue,
  \kconfigDependencies,
  \kconfigReverseDependencies,
  \kconfigNumericalRanges,
  \kconfigHelpText,
  \kconfigDefBool,
  \kconfigOptional

syn keyword kconfigTypeDefinition bool boolean tristate string hex int
  \ contained
  \ nextgroup=kconfigTypeDefPrompt,
  \   @kconfigConfigOptions
  \ skipwhite skipnl

syn match   kconfigTypeDefPrompt  '"[^"\\]*\%(\\.[^&q

Re: has anybody done syntax highlighting for linux Kconfig files ?

2006-04-10 Thread Nikolai Weibull
On 4/10/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> I found no syntax highlighting for Kconfig files (linux kernel configuration).
> I searched in vim7 runtime, and in vim.org/scripts, and in google.
>
> If anybody created Kconfig highlighting already, please post it either
> to vim.org/scripts or for inclusion into vimruntime,
> or send it to me, I am willing to maintain it. If not, I'll make it.

As per your request, here's a syntax/kconfig.vim.  It's rather
complete, although the documentation for the fileformat was
incomplete.  Still, writing parsers using only Vim's :syntax command
is quite fun actually.  The files are lit up like a christmas tree at
the moment, perhaps more to show that everything works than anything
else, but it's not that bad as it clearly separates the help messages
from the cruft around them.  Comments on making the actual
highlighting a little less "verbose" are welcome.

I've also included a ftplugin/kconfig.vim.

Bram: You can add these with the following matcher in filetype.vim:

  au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig

Enjoy.

  nikolai
" Vim filetype plugin file
" Maintainer:   Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision:  2006-04-10

if exists("b:did_ftplugin")
  finish
endif
let b:did_ftplugin = 1

let b:undo_ftplugin = "setl com< cms< fo<"

setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql


" Vim syntax file
" Maintainer:   Nikolai Weibull <[EMAIL PROTECTED]>
" Latest Revision:  2006-04-10

if exists("b:current_syntax")
  finish
endif

let s:cpo_save = &cpo
set cpo&vim

syn match   kconfigBegin  '^' nextgroup=kconfigKeyword
  \ skipwhite

syn keyword kconfigTodo   contained TODO FIXME XXX NOTE

syn match   kconfigCommentdisplay '#.*$' contains=kconfigTodo

syn keyword kconfigKeywordconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordmenuconfig nextgroup=kconfigSymbol
  \ skipwhite

syn keyword kconfigKeywordcomment menu mainmenu
  \ nextgroup=kconfigKeywordPrompt
  \ skipwhite

syn keyword kconfigKeywordchoice
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn keyword kconfigKeywordendmenu endchoice

syn keyword kconfigPreProcsource
  \ nextgroup=kconfigPath
  \ skipwhite

" TODO: This is a hack.  The who .*Expr stuff should really be generated so
" that we can reuse it for various nextgroups.
syn keyword kconfigConditionalif endif
  \ [EMAIL PROTECTED]
  \ skipwhite

syn match   kconfigKeywordPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

syn match   kconfigPath   '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
  \ contained

syn match   kconfigSymbol '\<\k\+\>'
  \ contained
  \ [EMAIL PROTECTED]
  \ skipwhite skipnl

" FIXME: There is – probably – no reason to cluster these instead of just
" defining them in the same group.
syn cluster kconfigConfigOptions  contains=kconfigTypeDefinition,
  \kconfigInputPrompt,
  \kconfigDefaultValue,
  \kconfigDependencies,
  \kconfigReverseDependencies,
  \kconfigNumericalRanges,
  \kconfigHelpText,
  \kconfigDefBool,
  \kconfigOptional

syn keyword kconfigTypeDefinition bool tristate string hex int
  \ contained
  \ nextgroup=kconfigTypeDefPrompt,
  \   @kconfigConfigOptions
  \ skipwhite skipnl

syn match   kconfigTypeDefPrompt  '"[^"\\]*\%(\\.[^"\\]*\)*"'
  \ containe