Share the perfect sublime text solution under Linux

Source: Internet
Author: User
Tags sublime text


Using sublime under Linux, the most difficult problem is the Chinese input method of support is too poor, I found here A has been played in the Chinese input patch sublime, here to share to you:
"Sublime Text 3065 Chinese 64 bit"

I analyzed the use of sublime Chinese patches, first of all, the sublime development team issued a multi-language patch, can be compiled into a .so file, and then use the LD_PRELOAD environment variables under Linux, the entire so file preloaded into the sublime process space.

LD_PRELOAD=/usr/lib/sublime_text_3/sublime_text_fcitx.so sublime_text_3

But I found that this has brought a serious bug, Chinese input is okay, but all the sub-processes can not be executed, we know that the powerful function of sublime and shell, if the child process can not be used, then the sublime is almost disabled.

Solution at first I did not think, I thought it was the process space problem, I try to find similar ld_perload features, but only the current process space effective patch method, but has not been found, but once, I changed the sublime startup script to this:

cd /usr/lib/sublime_text_3/LD_PRELOAD=./sublime_text_fcitx.so sublime_text_3

You can use it! I suddenly found that the problem is wrong, and the process space, ld_perload as an environment variable, will be passed to the child process, then the solution is simple, after the sublime startup, modify the environment variables can be!

So I wrote a little plugin:

# fix.pyimport osos.environ[‘LD_PRELOAD‘‘‘

OK, problem solved, I put this small piece of code also packaged in the original sublime installation package, this time sublime finally perfect run.

Share the perfect sublime text solution under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.