The codic plugin for vim by denops.vim.
Using vim-denops.
Use your favorite Vim plugin manager.
-
vim-plug
Plug 'vim-denops/denops.vim' Plug 'Omochice/dps-codic-vim'
-
dein.vim
call dein#add("vim-denops/denops.vim") call dein#add("Omochice/dps-codic-vim")
Get an access token from codic and register it as the environment variable $CODIC_TOKEN
.
export CODIC_TOKEN <YOUR ACCESS TOKEN>
Run :Codic <text you want to translate>
and the results will be displayed in a new window.
if run only :Codic
, ask text from commandline.
Up to 3 texts can be converted at the same time, separated by spaces (full-width or half-width).
You can set some variables. see official document(japanese) also.
It is used when request API.
-
g:dps_codic_project_id
The project id used for the translation.
Default: None (use default dictionary)
let g:dps_codic_project_id = 'Your project id'
-
g:dps_codic_casing
The casing of translated text.
It must be one of the bellow.
-
camel
like
translatedText
. -
pascal
like
TranslatedText
-
lower underscore
like
translated_text
-
upper underscore
like
TRANSLATED_TEXT
-
hyphen
like
translated-text
Default: None (separated with a space)
let g:dps_codic_casing = "one of the above"
-
-
g:dps_codic_acronym_style
The processing method for acronym when specify
g:dps_codic_casing
tocamel
orpascal
.It must be one of the bellow.
-
MS naming guidelines
-
camel strict
-
literal
Default: None (not process)
let g:dps_codic_acronym_style = "one of the above"
-