Ubuntu Sublime Text cannot enter the simplest solution in Chinese

  • 2020-12-10 01:05:18
  • OfStack

Sublime

Sublime Text is a code editor (Sublime Text2 is premium software, but can be tried indefinitely), as well as an advanced text editor for HTML and Prose. Sublime Text was developed by programmer Jon Skinner in January 2008. It was originally designed as an Vim with rich extensions.

Sublime Text has a beautiful user interface and powerful features such as code thumbnails, Python plug-ins, code snippets, and more. You can also customize key bindings, menus and toolbars. Key features of Sublime Text include spell check, bookmarking, full Python API, Goto, instant item switching, multiple selection, multiple Windows, and more. Sublime Text is a cross-platform editor that supports Windows, Linux, Mac OS X and other operating systems.

sublime is one of my favorite editing tools, but I can't enter Chinese under Ubuntu. I feel uncomfortable about this point, so I searched the Internet for a long time and summarized the following simple method.

1. Download the file we need, open the terminal, and enter:


git clone https://github.com/lyfeyaj/sublime-text-imfix.git
cd ~/sublime-text-imfix
sudo cp ./lib/libsublime-imfix.so /opt/sublime_text/
sudo cp ./src/subl /usr/bin/

2. Create a new shell script that is as simple as one sentence.

sublime New file input:


#!/bin/bash
LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so subl

Then save the file as sublime (note: no suffix) and put it in the /home folder. Now open sublime to enter Chinese.

conclusion


Related articles: