Skip to content

Using the same key to select completion and expand snippet #2

@lunik1

Description

@lunik1

Hello, I have been trying to configure asyncomplete so that in the pop up menu <CR> will expand a snippet if one is selected, otherwise insert the completion. My best attempt has been

imap <expr><CR> pumvisible() ? neosnippet#expandable() ? "\<Plug>(neosnippet_expand)" : "<C-y>" : "\<CR>"

but this seems to always choose a snippet if one is listed.

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