Skip to content

Program options syntax highlighting #20

@alx741

Description

@alx741

More+Less present options with a (nice) highlighting so vim-man should too, here are some observations about the default vim man.vim syntax file.

  • Default man.vim issues:
    • A lot of double hyphen options are not matched
    • Options in Synopsis and other sections are not matched (surrounded by [])
    • Options in the middle of other options description text are not matched
    • Commas after options are included in the match
  • (For implement this in vim-man) Take into count:
    • Options are denoted by one or tho hyphens -
    • If any alphanumerical symbol precedes the hyphen it's probably not an
      Options but a two-components word
    • Possible characters in an Option: Upper and lower case letters,
      numbers, -, _, ? (See :Man man for and example of the last one)
    • alone - or -- are commands too (common for read from stdin )
  • There is no special cases for man sections (?)

I'd like to know if I miss something or if something here is wrong; if this is correct an appropriate syntax match regex will do the job (?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions