您好,欢迎来到码863代码分享网! 请[登录] / [注册]

sublime配置save上传文件到服务器,Sublime保存同步到服务器

编辑

1、安装sftp

crtl+shift+p打开package control。

输入搜索sftp,点击安装sftp

2、配置服务器信息

{
    // The tab key will cycle through the settings when first created
    // Visit https://codexns.io/products/sftp_for_subime/settings for help
    
    // sftp, ftp or ftps
    "type": "sftp",

    "save_before_upload": false,
    "upload_on_save": true,
    "sync_down_on_open": false,
    "sync_skip_deletes": false,
    "sync_same_age": true,
    "confirm_downloads": false,
    "confirm_sync": true,
    "confirm_overwrite_newer": false,
    
    "host": "111.229.31.80",
    "user": "root",
    "password": "password",
    "port": "22",
    
    "remote_path": "/www/wwwroot",
    "ignore_regexes": [
        "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
        "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
        "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
    ],
    "file_permissions": "755",
    "dir_permissions": "755",
    
    //"extra_list_connections": 0,

    "connect_timeout": 30,
    //"keepalive": 120,
    //"ftp_passive_mode": true,
    //"ftp_obey_passive_host": false,
    "ssh_key_file": "C:\\Users\\zh10\\.ssh\\111.ppk",
    //"sftp_sudo": false,
    //"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,
}

3.remote同步

打开一个文件一夹与配置的remote_path对应

在侧边栏中的文件夹的右键菜单中,可以选择上传或下载来手动同步,保存时会自动上传

CopyRight 2002~2023 精通2100网 联系邮箱:qqtxt@163.com
版权所有:精通2100网 湘ICP备2023018646号-1
MYSQl共执行 3 个查询,用时 0.0017502307891846 秒,PHP脚本用时 0.003715 秒,占用内存 0.508 MB,Gzip 已启用