Is there a way to store the results of <C-N> or <C-X><C-O> from the insert mode in a string or list variable without triggering the respective popup menus to display onscreen? For example, I am able to store the output of the UltiSnips plugin without triggering a popup by using the following:

    redir => l:message
        silent call UltiSnips#ListSnippets()
    redir END

I know that once a popup menu is displayed, I can see its content with the complete_info() function. However, I do not want to open and close multiple popups in succession, since this results in screen flickers.

Ultimately, I wish to create a single popup menu with the results compiled from many other popup menus.

  • I think there’s a complete() function that may help. I would search around in the docs
    – D. Ben Knoble
    Oct 4 '20 at 13:20
  • @Ben, Yes, I will be using the complete() function to display my final single popup menu. However, first I need help gathering information from vim's various popup menus, without causing those popup menus to show onscreen.
    – Terry
    Oct 4 '20 at 21:40
  • The only other thing I can find is getcompletion which is specific to the vim command line.
    – D. Ben Knoble
    Oct 7 '20 at 16:08
  • @Ben, Thank you for the latest suggestion. getcompletion is not quite what I am looking for, as it can only show vim command line completions. It is my suspicion that what I want is not currently possible. complete_info() itself is a very new function added to the later versions of vim. If there were a way to gather all drop-down menu items without displaying the drop-down menus first, then authors of plugins such as mucomplete would have done that already, instead of just showing individual drop-down menus in order.
    – Terry
    Oct 9 '20 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.