Ubuntu下安装sublime text3

sublime text3 是一款非常简单易用的编辑器,而且还支持运行调试代码。

1. 先去官网下载sublime text3,进行安装:

sudo gdebi sublime-text_build-3126_amd64.deb

2. 启动sublime,按下Ctrl + ` 组合键调出命令面板,输入代码安装package control。
3. 安装插件 按下Ctrl+shift+p调出命令面板,输入install package,稍等一会,输入想要安装的插件如anaconda,autopep8等。
4. anaconda插件使代码白色边框, 可在Sublime > Preferences > Package Settings > Anaconda > Settings User 中设置关闭:{"anaconda_linting": false}
5. 配置Python3语法,在Tools-->Bulid System-->New Build System文件中输入以下内容并保存为python3.sublime-build
{
 "cmd": ["/usr/bin/python3", "-u", "$file"],
 "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
 "selector": "source.python"
}
################################################
#配置python路径为anaconda3/python3
{
    "cmd": ["/home/sxuan/anaconda3/bin/python3","-u","$file"],
    "file_regex":"^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}
6.安装Color​Picker插件,需要输入颜色时,可直接选取颜色。在画图时很好用的一个插件工具。
7. 安装sftp插件本地编辑同步远程服务器文件。

C:\Users\shexuan\AppData\Roaming\Sublime Text 3\Packages\User\sftp_servers目录下配置远程登录文件即可进行远程登录编辑服务器文件,如下:

{
    // The tab key will cycle through the settings when first created
    // Visit http://wbond.net/sublime_packages/sftp/settings for help
    
    // sftp, ftp or ftps
    "type": "sftp",

    "sync_down_on_open": true,
    "sync_same_age": true,
    
    "host": "202.114.72.42",
    "user": "sxuan",
    //"password": "password",
    //"port": "22",
    
    "remote_path": "/home/sxuan/",
    //"file_permissions": "664",
    //"dir_permissions": "775",
    
    //"extra_list_connections": 0,

    "connect_timeout": 30,
    //"keepalive": 120,
    //"ftp_passive_mode": true,
    //"ftp_obey_passive_host": false,
    //"ssh_key_file": "~/.ssh/id_rsa",
    //"sftp_flags": ["-F", "/path/to/ssh_config"],
    
    //"preserve_modification_times": false,
    //"remote_time_offset_in_hours": 0,
    //"remote_encoding": "utf-8",
    //"remote_locale": "C",
    //"allow_config_upload": false,
}

解决sublime text3 无法输入中文问题

  • 更新并升级系统为最新(较新的系统会解决很多可能出现的问题)
    sudo apt-get update && sudo apt-get upgrade
  • 克隆项目到本地 :
    git clone https://github.com/lyfeyaj/sublime-text-imfix.git
  • 运行脚本 :
    cd sublime-text-imfix && ./sublime-imfix
  • 完成! 重新启动后就可以在 Sublime Text 2/3 中 使用中文输入法了.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容