Skip to content
This repository was archived by the owner on Jul 27, 2018. It is now read-only.
This repository was archived by the owner on Jul 27, 2018. It is now read-only.

Mapping keys to complete first match of omni complete function #187

@dweidner

Description

@dweidner

I wanted to follow a tip to auto complete the name of the current HTML tag, whenever I start typing the closing tag from the Vim Tipps Wiki

" ftplugin/html.vim
inoremap <buffer> <lt>/ <lt>/<C-x><C-o><Esc>==gi

This works perfectly as long I am not using the nvim-completion-manager in my vimrc. For example typing…

<!-- test.html -->
<p>Hello World</

…completes to…

<!-- test.html -->
<p>Hello World</p>

When I enable nvim-completion-manager I can use the key combination <C-X><C-o> to open the popup menu and <C-o> to select the first match. Unfortunatly adjusting the previous keybinding to…

inoremap <buffer> <lt>/ <lt>/<C-x><C-o><C-o><Esc>==gi

…does not do the trick.

I think the problem is, that the tag suggestions loaded asynchronously are not available when the key mapping is executed and as a consequence no match can be selected from the popup menu.

Is there any workaround I could use?

Using neovim 0.2.2 on macOS 10.13.2 with the latest version of nvim-completion-manager.

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