Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lunik1 opened this issue Jan 7, 2019 · 0 comments
Open

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

lunik1 opened this issue Jan 7, 2019 · 0 comments

Comments

@lunik1
Copy link

lunik1 commented Jan 7, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant