/tmux-translator

Tmux translation plugin powered by popup window.

Primary LanguageShellMIT LicenseMIT

English | 中文

Installation

Requirements

Install via TPM

Add this line to your ~/.tmux.conf:

set -g @plugin 'sainnhe/tmux-translator'

Reload the configuration and press prefix + I

Usage

Enter Copy Mode and select some text, then press t to translate it.

To close the popup window, press Enter or Ctrl-C.

To customize this plugin:

# the key to trigger translation
set -g @tmux-translator "t"

# the width of popup window
set -g @tmux-translator-width "38%"

# the height of popup window
set -g @tmux-translator-height "38%"

# translate from
set -g @tmux-translator-from "en"

# translate to
set -g @tmux-translator-to "zh"

# engine
set -g @tmux-translator-engine "google"
# multiple engines
set -g @tmux-translator-engine "google|ciba|youdao"

See skywind3000/translator#engines for all available engines.

More plugins

License

For the code in the /engine directory, see skywind3000/translator.

Other code is distributed under MIT license.