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

how to behave like YCM when scroll the popup content #912

Closed
chenjie199234 opened this Issue Jan 9, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@chenjie199234
Copy link

chenjie199234 commented Jan 9, 2019

The deoplete works fine.
I just want to know how behave like this.
When i scroll the popup menu:
Deoplete:i need to insert Enter Key every time i scroll the popup menu to select the right content.
YCM:i dont need to insert Enter Key,it will write the content under the cursor when i scroll the popun menu

@roxma

This comment has been minimized.

Copy link
Contributor

roxma commented Jan 9, 2019

Use <C-N> and <C-P> instead of <down> and <up> for scrolling the popup menu?

@chenjie199234

This comment has been minimized.

Copy link

chenjie199234 commented Jan 9, 2019

@roxma can we add an option to set the key like YCM.
here are my set.
inoremap <C-j> <Down>
inoremap <C-k> <Up>
what i want is that:
if (there is a popup menu)
<C-j> <C-k> will work like <C-n> <C-p>
else
<C-j> <C-k> will work like <Down> <Up>
In Ycm,there is an option to set <Down> <Up>to work like <C-n> <C-p>.
But in deoplete i can't set that.

@Shougo

This comment has been minimized.

Copy link
Owner

Shougo commented Jan 10, 2019

inoremap <expr><C-j> pumvisible()? "\<C-n>" : "\<Down>"
inoremap <expr><C-k> pumvisible()? "\<C-p>" : "\<Up>"

@Shougo Shougo closed this Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment