Skip to content
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

Support alternative key-binding for navigation #66

Closed
demon386 opened this issue Oct 18, 2019 · 4 comments · Fixed by #798
Closed

Support alternative key-binding for navigation #66

demon386 opened this issue Oct 18, 2019 · 4 comments · Fixed by #798

Comments

@demon386
Copy link

Personally I'd prefer Ctrl-p/n instead of Ctrl-k/j. It would be great if I can adjust the default key bindings. Thanks!

@liuchengxu
Copy link
Owner

liuchengxu commented Oct 18, 2019

If you are using neovim, it's not hard by adding these two lines in your vimrc:

autocmd FileType clap_input inoremap <silent> <buffer> <C-n> <C-R>=clap#navigation#linewise('down')<CR>
autocmd FileType clap_input inoremap <silent> <buffer> <C-p> <C-R>=clap#navigation#linewise('up')<CR><CR>

For vim, it's unable to do such a thing atm.

@demon386
Copy link
Author

Thanks. I use neovim and that solved my problem.

@ziulev
Copy link

ziulev commented Jun 6, 2020

E117: Unknown function: clap#handler#navigate_result

image

@liuchengxu
Copy link
Owner

@jet8a Ok, that comment is outdated, you should take a look how ftplugin/clap_input.vim does, https://github.com/liuchengxu/vim-clap/blob/master/ftplugin/clap_input.vim.

autocmd FileType clap_input inoremap <silent> <buffer> <C-n> <C-R>=clap#navigation#linewise('down')<CR>
autocmd FileType clap_input inoremap <silent> <buffer> <C-p> <C-R>=clap#navigation#linewise('up')<CR>

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

Successfully merging a pull request may close this issue.

3 participants