ubuntu下sublime3无法输入中文

一、从命令行启动

  1. git clone https://github.com/lyfeyaj/sublime-text-imfix.git
  2. cd ~/sublime-text-imfix

     这里进入的从github下载下来的文件夹,我直接在主目录clone的,所以直接进入~/sublime-text-imfix

  3. sudo cp ./lib/libsublime-imfix.so /opt/sublime_text/
  4. sudo cp ./src/subl /usr/bin/

            补充一句,测试一下,如果可以,就可以删除下载的文件了。

二、右键打开方式

此方式建立在上述方式上

  1. sudo gedit /usr/share/applications/sublime_text.desktop

    内容如下

  2. [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Sublime Text
    GenericName=Text Editor
    Comment=Sophisticated text editor for code, markup and prose
    Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text %F"
    Terminal=false
    MimeType=text/plain;
    Icon=sublime-text
    Categories=TextEditor;Development;
    StartupNotify=true
    Actions=Window;Document;
    [Desktop Action Window]
    Name=New Window
    Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text -n"
    OnlyShowIn=Unity;
    [Desktop Action Document]
    Name=New File
    Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text --command new_file"
    OnlyShowIn=Unity;



转载于:https://my.oschina.net/abely/blog/613738

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值