racer-rust / racer

Rust Code Completion utility
MIT License
3.36k stars 278 forks source link

Explain how to change omnifunc key bindings in README #1089

Closed matu3ba closed 4 years ago

matu3ba commented 4 years ago

Here it is explained to change keybinding for autocompletion. Is it okay to add to the README ? The default key bindings are inconvenient for fast typing.

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

matu3ba commented 4 years ago

A wrapper function could also provide them in the library.

matu3ba commented 4 years ago

One might want to remap the omnifunc call as well with inoremap <expr> <C-l><C-l> pumvisible() ? "\<C-l><C-l>" : "\<C-x><C-o>"

kngwyu commented 4 years ago

Please file an issue at https://github.com/racer-rust/vim-racer