vim-translator: asynchronous translation inside Vim and Neovim
:closed_book: Translating plugin for Vim/Neovim
At a glance
- What is it?
- vim-translator is a Vim Script plugin that translates selected or cursor text through several free web engines without leaving the editor, with asynchronous and multithreaded requests, a floating window or popup for the result, a configurable proxy, and no application id or key required. It supplies no default mappings, so you wire the ones you want.
- Who is it for?
- Adopt vim-translator if you work in Vim or Neovim and want to translate text without leaving the editor, and you are willing to define your own keymaps since the plugin deliberately ships none. Skip it if you need a translation service with a documented API and a stability guarantee, since these are unofficial web endpoints.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 62 days ago.
- What is it written in?
- Mainly Vim Script, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the plugin actually does
vim-translator is described as an asynchronous translating plugin for Vim and Neovim, and the feature list in the README is short enough to read at a glance. Translation is asynchronous and multithreaded, so the editor does not block while a request is in flight. There is support for a popup window in Vim 8 and a float window in Neovim, which is the mechanism the README calls out as the two ways a result is displayed. There are multiple engines to choose from, with a configuration option listing them. There is proxy support, through a proxy URL setting. And there are no requirements for an appid or appkey, which is the point that distinguishes it from most translation integrations, since a plugin that needs credentials is a plugin whose setup you have to keep working. The plugin also lists a statusline variable, a history option, a set of highlight groups you can override, and a log command, which together make it feel like a small feature rather than a script. The repository is MIT licensed, its primary language is Vim Script, and the last push was on 2026-08-23, with the project not archived and no GitHub releases.
Installation is one line, and no mappings come with it
The installation section is a single plugin manager line.
Plug 'voldikss/vim-translator'What follows it matters more than the line itself. The plugin does not supply any default mappings, which is stated in the key mappings section as a flat fact, and that is a deliberate choice rather than an omission. A plugin that binds keys in your editor has to be trusted with them, and many users would rather choose where the shortcuts live. The README therefore ships a configuration example rather than a default, mapping the leader key to four different plug targets in normal and visual modes.
""" Configuration example
" Echo translation in the cmdline
nmap <silent> <Leader>t <Plug>Translate
vmap <silent> <Leader>t <Plug>TranslateV
" Display translation in a window
nmap <silent> <Leader>w <Plug>TranslateW
vmap <silent> <Leader>w <Plug>TranslateWV
" Replace the text with translation
nmap <silent> <Leader>r <Plug>TranslateR
vmap <silent> <Leader>r <Plug>TranslateRV
" Translate the text in clipboard
nmap <silent> <Leader>x <Plug>TranslateXSo the surface is a set of plug mappings, one per output mode, and you pick which ones to bind. The visual mode variants exist so that a selection can be translated without the range syntax.
Four output modes, and what each one does with the result
The commands section defines the same command family in four shapes, and the difference is what happens to the result. The base command is Translate, with a bang, several options and optional text. Its behaviour is described step by step, which is the clearest specification in the README. If engines is not given it uses g:translator_default_engines. If text is not given it uses the text under the cursor. If target_lang is not given it uses g:translator_target_lang. The command can also be passed a range, so a visual selection can be translated. And if a bang is provided the plugin performs a reverse translation by switching the target and source languages, which is the fastest way to check how a phrase reads the other way round. TranslateW is like Translate but displays the translation in a window. TranslateR is like Translate but replaces the current text with the translation, which is the one you want when editing prose in a foreign language. TranslateX translates the text in the clipboard. The examples use the commands directly.
:Translate " translate the word under the cursor
:Translate --engines=google,youdao are you ok " translate text `are you ok` using google and youdao engines
:2Translate ... " translate line 2
:1,3Translate ... " translate line 1 to line 3
:'<,'>Translate ... " translate selected linesThere are two more commands that are not part of the family. TranslateH exports the translation history, and TranslateL displays log messages, which together with the history option give you a record of what was translated and a way to see what the plugin is doing when a request fails.
Configuration is a handful of globals
The configuration section is a list of global variables with a type, a default and a note, and it is short enough to read in full before you install anything. g:translator_target_lang is a String defaulting to 'zh'. g:translator_source_lang is a String defaulting to 'auto', so the source language is detected when it is not given. g:translator_default_engines is a List of String, with the available values given as bing, google, haici, iciba, trans and youdao, and iciba is marked as expired in the list, which is the first thing to notice if you plan to use it. The default value of the engine list is conditional, with bing, google, haici and youdao when the target language is 'zh' and google alone otherwise. g:translator_proxy_url is a String defaulting to an empty string, with an example given as a socks5 proxy on the local machine. g:translator_history_enable is a Boolean defaulting to false. g:translator_window_type is a String defaulting to 'popup', with 'preview' as the alternative, where popup means a float window in Neovim or a popup in Vim. The width and height settings are a Number of columns or lines, or a Float between 0 and 1 which is then relative to the editor dimensions, and both default to 0.6. The last one, g:translator_window_borderchars, is a List of String for the floating window border, with a default of a set of box drawing characters. The language support list is kept in the project wiki rather than in the README, so the set of target languages grows outside the repository.
Scrolling a floating window needs a little help
Once the translation window is open, the README explains that you type Control-w p to jump into it and again to jump back, which is the standard Vim way of moving between a window and its parent. There is a second detail, a function that can be used to scroll the window, and it only works in Neovim. The mapping for it is expression based, so the scroll happens only when the window can scroll and the key falls through to its normal meaning otherwise.
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-b>"The window size settings make this worth the extra mapping, since a float that is 60 percent of the editor by default has room for a fair amount of text and the long results of a sentence level translation will need scrolling. The conditional is the part that makes the mapping safe to install globally, since a plain mapping would swallow the key even when there was nothing to scroll.
Highlighting, statusline and the shape of the repository
The plugin exposes its own highlight groups so the result looks like part of your theme rather than an imported block of foreign text, and the defaults are listed so they can be overridden with hi or hi link.
" Text highlight of translator window
hi def link TranslatorQuery Identifier
hi def link TranslatorDelimiter Special
hi def link TranslatorExplain Statement
" Background of translator window border
hi def link Translator Normal
hi def link TranslatorBorder NormalFloatThe grouping is worth noticing, because the query, the delimiter and the explanation are separate groups, which means the plugin is showing more than the translated text, with the original query distinguishable from the result and from any explanatory text the engine returns. There is also a g:translator_status variable for the statusline, which is how the plugin can report that a request is in flight without a message. The repository layout matches a well behaved Vim plugin, with an autoload/ directory, a plugin/ directory, a doc/ directory, a syntax/ directory, a script/ directory and a test/ directory, alongside a .github/ directory, a .gitignore and the LICENSE. The presence of a test directory and of a CI badge at the top of the README indicates the plugin is checked automatically. The README closes by pointing at two projects it draws on, dict.vim and skywind3000's translator, and it maintains issue labels for FAQ entries and for breaking changes, which is where you would look to understand a behavioural change between versions.
Where vim-translator is the wrong choice
The first limit is the engines themselves. These are public web translation endpoints rather than a documented API, and the README already marks one of them as expired, which is a strong hint about the durability of the set. A provider that changes its page structure, tightens its rate limits or starts blocking requests from your network will make the plugin fail, and the failure mode is a translation that never appears rather than an error message that says why. The second is that there is no application id or key, which is convenient for setup and means there is no account to manage, but it also means there is no service level and no way to ask a provider for more capacity. The third is the maintenance pattern, with no GitHub releases, so a behavioural change arrives in the master branch and you find out when it happens, which is why the README points at the breaking change label as the place to look. The fourth is the engine selection, since the default list gives you four engines for Chinese targets and only google otherwise, so a user outside that case is relying on a single provider unless they configure more. The fifth is the scope of the plugin, which is a translator and nothing else, with no translation memory, no glossary, no batch handling of a document and no way to translate more than the current selection, so a person translating a long document is still doing the work one passage at a time.
Editorial conclusion
Adopt vim-translator if you work in Vim or Neovim and want to translate text without leaving the editor, and you are willing to define your own keymaps since the plugin deliberately ships none. Skip it if you need a translation service with a documented API and a stability guarantee, since these are unofficial web endpoints. Verify first which engines still answer from your network, since one of the listed providers is marked expired, that your proxy setting is correct if you are behind one, and that your Vim or Neovim version supports the floating window you intend to use.
Frequently asked questions
How do I install vim-translator and set up a keymap?
Install it with a plugin manager, for example Plug 'voldikss/vim-translator'. The plugin supplies no default mappings, so you bind the ones you want yourself, such as nmap <silent> <Leader>t <Plug>Translate to echo the translation in the command line and nmap <silent> <Leader>w <Plug>TranslateW to show it in a window, with matching visual mode variants.
Which translation engines does vim-translator support?
The available engines are bing, google, haici, iciba, trans and youdao, and the README marks iciba as expired. The g:translator_default_engines setting defaults to bing, google, haici and youdao when the target language is 'zh', and to google alone otherwise, and no application id or application key is required for any of them.
How do I set the target language and read the result in a floating window?
Set g:translator_target_lang to a language string, with 'zh' as the default, and g:translator_source_lang to 'auto' to let the plugin detect the source. The window type is controlled by g:translator_window_type, defaulting to 'popup', which uses a float window in Neovim and a popup in Vim, and its size comes from g:translator_window_max_width and g:translator_window_max_height, which take a number or a float relative to the editor size and default to 0.6.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/voldikss-vim-translator)Was this useful?