mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
neovim: translator.vim -> translate-shell.vim
This commit is contained in:
parent
70a255ad39
commit
1f81225ca4
@ -37,7 +37,7 @@ source $HOME/.config/nvim/plug-config/rooter.vim
|
||||
source $HOME/.config/nvim/plug-config/spaceline.vim
|
||||
" source $HOME/.config/nvim/plug-config/startify.vim
|
||||
source $HOME/.config/nvim/plug-config/tablemode.vim
|
||||
source $HOME/.config/nvim/plug-config/translator.vim
|
||||
source $HOME/.config/nvim/plug-config/translate-shell.vim
|
||||
source $HOME/.config/nvim/plug-config/undo.vim
|
||||
source $HOME/.config/nvim/plug-config/vim-buffet.vim
|
||||
source $HOME/.config/nvim/plug-config/vimwiki.vim
|
||||
|
28
home/.config/nvim/plug-config/translate-shell.vim
Normal file
28
home/.config/nvim/plug-config/translate-shell.vim
Normal file
@ -0,0 +1,28 @@
|
||||
" Basics
|
||||
let g:trans_join_lines = 1
|
||||
let g:trans_win_height = 15
|
||||
|
||||
" Directions
|
||||
" let g:trans_interactive_full_list = 1
|
||||
let g:trans_default_direction = ":ja"
|
||||
let g:trans_directions_list = [
|
||||
\ ['', 'en'],
|
||||
\ ['', 'ja'],
|
||||
\ ['', 'de'],
|
||||
\ ['', 'ru'],
|
||||
\ ['', 'fr'],
|
||||
\ ['', 'nl'],
|
||||
\ ['', 'la'],
|
||||
\ ['', 'es'],
|
||||
\ ['', 'zh-CN'],
|
||||
\ ['', 'zh-TW'],
|
||||
\ ]
|
||||
|
||||
nnoremap <silent> <leader>jt :Trans<CR>
|
||||
vnoremap <silent> <leader>jt :Trans<CR>
|
||||
nnoremap <silent> <leader>jd :TransSelectDirection<CR>
|
||||
vnoremap <silent> <leader>jd :TransSelectDirection<CR>
|
||||
nnoremap <silent> <leader>jr cw<C-R>=system('trans -brief -no-ansi', getreg(""))[:-2]<CR>
|
||||
vnoremap <silent> <leader>jr c<C-R>=system('trans -brief -no-ansi', getreg(""))[:-2]<CR>
|
||||
nnoremap <silent> <leader>jc cw<C-R>=system('trans -brief -no-ansi :', getreg(""))[:-2]<S-Left><S-Left><Right>
|
||||
vnoremap <silent> <leader>jc c<C-R>=system('trans -brief -no-ansi :', getreg(""))[:-2]<S-Left><S-Left><Right>
|
@ -1,22 +0,0 @@
|
||||
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>"
|
@ -238,12 +238,12 @@ let g:which_key_map.i = {
|
||||
\ 'x' : [':.!toilet -f term -F border' , 'border'],
|
||||
\ }
|
||||
|
||||
let g:which_key_map.T = {
|
||||
let g:which_key_map.j = {
|
||||
\ 'name' : '+Translate' ,
|
||||
\ 't' : 'to cmdline',
|
||||
\ 'w' : 'to popup',
|
||||
\ 'r' : 'replace text',
|
||||
\ 'x' : 'to clipboard',
|
||||
\ 't' : 'default',
|
||||
\ 'd' : 'direction',
|
||||
\ 'r' : 'replace',
|
||||
\ 'c' : 'custom replace',
|
||||
\ }
|
||||
|
||||
" Table mode
|
||||
|
@ -97,7 +97,7 @@ Plug 'psliwka/vim-smoothie'
|
||||
" Alternative w,b,e
|
||||
" Plug 'bkad/CamelCaseMotion'
|
||||
" Spelling, dictionary
|
||||
Plug 'voldikss/vim-translator'
|
||||
Plug 'echuraev/translate-shell.vim'
|
||||
" Plug 'reedes/vim-lexical'
|
||||
" Plug 'ron89/thesaurus_query.vim'
|
||||
" Align text
|
||||
|
Loading…
Reference in New Issue
Block a user