Skip to content

Separate cite completion menu from "smart mode" match string #2095

@lervag

Description

@lervag

Cite completion by default matches on the string displayed in the "menu part" of the completion menu which is defined by g:vimtex_complete_bib.menu_fmt. As was discussed in #2091, it seems useful to have an alternative option such as g:vimtex_complete_bib.match_str_fmt to separate the string displayed in the menu with the string used for cite completion filtering.

Suggested specification: Add new key to g:vimtex_complete_bib option with the following documentation (similar to the current :help g:vimtex_complete_bib.menu_fmt):

                                          *g:vimtex_complete_bib.match_str_fmt*
  match_str_fmt
    Default value: '@key [@type] @author_all (@year), "@title"'
    The format used for the match string for bib completion candidates. That
    is, the string that the smart mode candidate matching is matched against.
    See |vimtex-complete-cites| for more info. See the description of
    `menu_fmt` for the allowed keys.

    Note: If you change this option, you should also clear the related cache
          files (i.e. `~/.cache/vimtex/bibcomplete*.json` on Linux systems).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions