vincentcordobes / vim-translate Goto Github PK
View Code? Open in Web Editor NEWA tiny translate-shell wrapper for Vim
License: MIT License
A tiny translate-shell wrapper for Vim
License: MIT License
Thanks a lot for this nice plugin. I tried it with vim
(8.1.542) and neovim
(0.3.1) (both using vim-plug
). The Translate
command is available and works as expected once the plugin is installed with PlugInstall
. Unfortunately, if vim
or nvim
is restarted, the Translate
command is not available unless vim-translate
is reinstalled. I must be missing something?
Hi!
Great plugin! I love the minimalism ๐ฅ, sitting on the shoulders of giants.
Thanks to the wierdness of vim, in autoload/translate.vim
, the backup mechanism for register a
using =
doesn't remember the type (v
, V
or ^V
) of a
. To see it, if a
initially contain visual-block-coppied text, after translating something, "ap
will put a
as if it was a set of lines.
To fix this, we could replace
let l:backup = @a
" and
let @a = l:backup
by
let l:regtype = getregtype('a')
let l:regtext = getreg('a')
" and
call setreg('a', l:regtext, l:regtype)
respectively.
Otherwise, I think it could be nice to have operator mappings (as <Plug>
mappings) to translate text with operators. e.g it would allow something like <leader>tiw
to translate the current word as in #10, or <leader>t)
to translate until the end of the sentence.
Would you mind PR(s) ?
Regards
Translate-shell can run under Windows (through WSL, Cygwin, or MSYS2).
And there is also gvim under windows.
Can I use vim-translate in gvim under window with WSL or cygwin and translate-shell?
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled May 10 2018 21:31:21)
macOS version
Included patches: 1-1809
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +comments +file_in_path +linebreak +mouse_urxvt +quickfix +terminal +windows
+arabic +conceal +find_in_path +lispindent +mouse_xterm +reltime +terminfo +writebackup
+autocmd +cryptv +float +listcmds +multi_byte +rightleft +termresponse -X11
-autoservername +cscope +folding +localmap +multi_lang +ruby +textobjects -xfontset
-balloon_eval +cursorbind -footer -lua -mzscheme +scrollbind +timers -xim
+balloon_eval_term +cursorshape +fork() +menu +netbeans_intg +signs +title -xpm
-browse +dialog_con -gettext +mksession +num64 +smartindent -toolbar -xsmp
++builtin_terms +diff -hangul_input +modify_fname +packages +startuptime +user_commands -xterm_clipboard
+byte_offset +digraphs +iconv +mouse +path_extra +statusline +vertsplit -xterm_save
+channel -dnd +insert_expand -mouseshape +perl -sun_workshop +virtualedit
+cindent -ebcdic +job +mouse_dec +persistent_undo +syntax +visual
-clientserver +emacs_tags +jumplist -mouse_gpm +postscript +tag_binary +visualextra
+clipboard +eval +keymap -mouse_jsbterm +printer +tag_old_static +viminfo
+cmdline_compl +ex_extra +lambda +mouse_netterm +profile -tag_any_white +vreplace
+cmdline_hist +extra_search +langmap +mouse_sgr -python -tcl +wildignore
+cmdline_info +farsi +libcall -mouse_sysmouse +python3 +termguicolors +wildmenu
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -D_DARWIN_C_SOURCE -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -framework AppKit -mmacosx-version-min=10.13 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -L/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -lpython3.6m -framework CoreFoundation -lruby.2.5.0 -lobjc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.