mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-01 11:48:41 -05:00
23 lines
913 B
VimL
23 lines
913 B
VimL
let g:translator_target_lang = 'ja'
|
|
let g:translator_source_lang = 'auto'
|
|
let g:translator_default_engines = ['trans']
|
|
let g:translator_history_enable = v:false
|
|
|
|
" Echo translation in the cmdline
|
|
nmap <silent> <Leader>Tt <Plug>Translate
|
|
vmap <silent> <Leader>Tt <Plug>TranslateV
|
|
" Display translation in a window
|
|
nmap <silent> <Leader>Tw <Plug>TranslateW
|
|
vmap <silent> <Leader>Tw <Plug>TranslateWV
|
|
" Replace the text with translation
|
|
nmap <silent> <Leader>Tr <Plug>TranslateR
|
|
vmap <silent> <Leader>Tr <Plug>TranslateRV
|
|
" Translate the text in clipboard
|
|
nmap <silent> <Leader>Tx <Plug>TranslateX
|
|
|
|
" Scrolling the popup window
|
|
nnoremap <silent><expr> <M-f> translator#window#float#has_scroll() ?
|
|
\ translator#window#float#scroll(1) : "\<M-f>"
|
|
nnoremap <silent><expr> <M-b> translator#window#float#has_scroll() ?
|
|
\ translator#window#float#scroll(0) : "\<M-f>"
|