Issue #32 new

Make menu dismissible

Damien Pollet
created an issue

The ACP popup menu is sometimes too intrusive. I haven't found a reliable and convenient way to dismiss it.

<ESC> is not acceptable because it exits insert mode (and there is a delay before the menu effectively disappears.

Movement keys or typing text works, but are unacceptable if you don't want to type anything at this moment.

<Enter> is of course not acceptable if you don't want the completion.

Also, there seems to be a difference in behavior for the filename completion (no way to go back to original, so no way to enter a partial filename match at the end of a line)

Comments (1)

  1. JB Braendel

    I got this working so that whenever the menu pops up, its automatically deselected, and you can click enter without selecting anything

    autocomplpop/autoload/acp.vim : line 196,

        return (s:behavsCurrent[s:iBehavs].command =~# "\<C-p>" ? "\<C-n>\<Up>\<Down>"
              \                                                 : "\<C-p>\<Down>\<Up>")

    (this automatically places menu in unselected state)


    inoremap <expr> <CR> pumvisible() ? "\<CR>\<CR>" : "\<CR>"

    (this presses enter twice when the popup menu is open. NOTE this means that you will have to close the menu some other way when you do decide to use it, this isn't a problem for me since I generally use the spacebar)

  2. Log in to comment