ubuntu 是很普通的linux 发行版
对新手很友好
最近用spacemacs 学习 c c++
记录一下 使用过程中的 遇到的问题
ubuntu 是很普通的linux 发行版
对新手很友好
最近用spacemacs 学习 c c++
记录一下 使用过程中的 遇到的问题
use chatGPT to learn spacemacs
ask “spacemacs bind key M-o to use fanyi”
To bind the M-o
key to use fanyi in Spacemacs, you can follow these steps:
Open your .spacemacs
file by running SPC f e d
.
Scroll down to the dotspacemacs/user-config
section and add the following code:
(global-set-key (kbd “M-o”) 'fanyi-dwim)
This binds the `M-o` key to the `fanyi-dwim` command.
2. Save and close the configuration file by running `SPC f s`.
3. Reload Spacemacs by running `SPC q r` or by restarting Emacs.
That's it! You should now be able to use the `M-o` key to translate text using fanyi in Spacemacs. To translate text, simply select the text you want to translate and press `M-o`. This will show a popup buffer with the translated text.
Spacemacs has a built-in package called fanyi which provides translation functionality using online translation services. To use fanyi in Spacemacs, you can follow these steps:
Ensure that the fanyi package is installed. You can do this by checking your .spacemacs file for the following line:
dotspacemacs-additional-packages '(fanyi)
If it is not present, add it and save the file.
Open the file you want to translate.
Select the text you want to translate.
Run the command SPC T t to translate the selected text.
This will show a popup buffer with the translated text.
To close the popup buffer, press q.
That’s it! You can now use fanyi to translate text within Spacemacs. Note that fanyi uses online translation services, so an internet connection is required for it to work properly.