Skip to content

[question] How to confirm for vimtex's K by default? #2567

@Freed-Wu

Description

@Freed-Wu

When I press K, it echoes Open documentation for usepackage: siunitx? [y]es/[n]o:. How to let vimtex always open without confirmation?

BTW. :VimtexDocPackage siunitx will get

Error detected while processing function vimtex#doc#package[1]..vimtex#doc#get_context:
line    1:
E121: Undefined variable: a:word
function! vimtex#doc#get_context(...) abort " {{{1
  let l:context = a:0 == 0 || empty(a:1)
        \ ? s:packages_get_from_cursor()
        \ : {
        \     'type': 'word',
        \     'candidates': [a:word],
        \   }
  if empty(l:context) | return {} | endif

  call s:packages_remove_invalid(l:context)

  return l:context
endfunction

I doubt it is a bug. Maybe you want to use a:1 not a:word.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions