codegeex in vim using coc.nvim
first install coc.nvim
and in vim install plugin: coc-codegeex :CocInstall coc-codegeex
use :CocConfig
open configuration file, add apiKey
and apiSecret
. You can apply this in tianqi
{
"codegeex": {
"apiKey": "your_api_key",
"apiSecret": "your_api_secret",
}
}
when you stop type, you will see the completion list. use Enter
to confirm selection, the selected code will be inserted.
set keymap in .vimrc
vmap <silent> <C-l> <Plug>(coc-codegeex-translate-keymap)
in vim visual mode, select some code and use ctrl + l
to trigger translation.
MIT
This extension is built with create-coc-extension