• sublime text 3 build 3143 安装详解


    sublime text 3 build 3143 安装详解

      环境:ubuntu 16 (x64)

    0x00 下载

      官网下载地址
      下载的文件是个压缩包,笔者解压之后将整个sublime-text-3放在主目录/opt/下

    0x01 配置别名

      修改用户下的环境变量配置文件~/.bashrc

    vim ~/.bashrc
    

      根据运行程序存放的路径位置,在文件中添加

    alias subl="~/opt/sublime_text_3/sublime_text"
    

      保存修改后的结果,执行下面的语句

    source ~/.bashrc
    

    0x02 快捷方式与右键菜单

      将程序主目录下面的sublime_text.desktop放置到/usr/share/applications/下,然后对其进行修改

    vim /usr/share/applications/sublime_text.desktop
    

      做如下修改:

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Sublime Text
    GenericName=Text Editor
    Comment=Sophisticated text editor for code, markup and prose
    Exec=/home/d0main/opt/sublime_text_3/sublime_text %F
    Terminal=false
    MimeType=text/plain;
    Icon=/home/d0main/opt/sublime_text_3/Icon/128x128/sublime-text.png
    Categories=TextEditor;Development;
    StartupNotify=true
    Actions=Window;Document;
    
    [Desktop Action Window]
    Name=New Window
    Exec=/home/d0main/opt/sublime_text_3/sublime_text -n
    OnlyShowIn=Unity;
    
    [Desktop Action Document]
    Name=New File
    Exec=/home/d0main/opt/sublime_text_3/sublime_text --command new_file
    OnlyShowIn=Unity;
    

      FYI:Exec指定程序路径,%F是将打开方式添加至右键菜单。Icon指定图标路径(程序主目录下的Icon文件夹里)

      保存退出。双击/usr/share/applications/下面的sublime_text图标,即打开程序。之后就可以将其锁定到Launcher中了。
      可以将图标复制到桌面;鼠标右击可编辑文本文件就可以看到可使用sublime-text打开文件的选项了;命令行使用subl +文件名就可以打开或创建文件了。

    0x03 修复中文输入法问题

    如果你已经有了中文输入法比如搜狗拼音,但是在sublime text 3中又无法使用,可以阅读一下下面的博客尝试修复。以上安装版本亲测可用。
    sublime text 3在linux下无法输入中文的解决办法

  • 相关阅读:
    TCP和UDP区别
    session和cookie的区别
    2019 腾讯正式批笔试题题解
    modCount干嘛的
    分布式系统唯一ID生成方案汇总
    分布式数据库名词
    快手第一题
    南柯一梦
    349. 两个数组的交集
    synchronized锁优化
  • 原文地址:https://www.cnblogs.com/d0main/p/7607665.html
Copyright © 2020-2023  润新知