Skip to content

Note

不挑戰記憶力的技術筆記

Menu
Menu

Sublime Text 2 使用SFTP遠端同步編輯檔案

Posted on 2014 年 6 月 23 日 by febr

現在文字編輯器習慣使用Sublime Text 2,但在local端寫完,再透過FTP將檔案上傳,非常麻煩,因此可利用SFTP來達成此目的。

 

步驟1:使用Packge Control安裝SFTP套件

 

步驟2:將資料夾加入Sublime Text 2的project(左列的Folder)

加入方式:Sublime Text 2的Project -> Add Folder to Project…

 

步驟3:對project設定SFTP/FTP(資料夾右鍵:SFTP/FTP -> Map to Remote…)

接著此資料夾底下會自動新增一份設定檔:sftp-config.json,主要有幾個要設定的參數:

{
    "type": "ftp", // 與遠端連線的模式(ftp 或 sftp)
    "save_before_upload": true, // 上傳前是否存檔
    "upload_on_save": true, // 檔案儲存時同時上傳

    "host": "yourdomain.com", // FTP server
    "user": "account",
    // "password": "password", // 可不填寫,上傳時會詢問
    // "port": "21", // 可以不填寫,預設FTP爲21、SFTP爲22

    "remote_path": "/var/www/", // 遠端路徑
}

可不填寫的參數,在預設的設定檔都會註解起來。

若upload_on_save設定為false,可對左列Folder的檔案或分頁頁籤點右鍵Upload File。

參考文件:http://wbond.net/sublime_packages/sftp/settings#setting-save_before_upload

發佈留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

近期文章

  • [AWS] S3 Object Initiate restore (復原回 Standard)
  • [Windows] 使用者快速登出的方法 Logout/ Logoff/Sign Out from Windows User Account
  • [Windows] Windows 11 安裝Server管理工具Install RSAT(Remote Server Administrator Tools)
  • Chrome出現:你的連線不是私人連線 Your connection is not private
  • [C#] 取得 Request URL 的方法

近期留言

    彙整

    分類

    • Ajax
    • Android
    • ASP
    • ASP.NET MVC
    • Azure
    • C#
    • Cisco
    • CSS
    • Delphi
    • Developer Tools
    • Framework
    • FreeBSD
    • Git
    • HTML5
    • javascript
    • jQuery
    • Juniper
    • Linux
    • Mac
    • PHP
    • Python
    • Server&OS
    • Software
    • SQL server
    • Sublime Text
    • Ubuntu
    • Visual Studio
    • Vmware
    • Web Design
    • Web Development
    • Windows
    • WordPress
    • 未分類
    • 未分類

    彙整

    分類

    • Ajax
    • Android
    • ASP
    • ASP.NET MVC
    • Azure
    • C#
    • Cisco
    • CSS
    • Delphi
    • Developer Tools
    • Framework
    • FreeBSD
    • Git
    • HTML5
    • javascript
    • jQuery
    • Juniper
    • Linux
    • Mac
    • PHP
    • Python
    • Server&OS
    • Software
    • SQL server
    • Sublime Text
    • Ubuntu
    • Visual Studio
    • Vmware
    • Web Design
    • Web Development
    • Windows
    • WordPress
    • 未分類
    • 未分類

    其他操作

    • 登入
    • 訂閱網站內容的資訊提供
    • 訂閱留言的資訊提供
    • WordPress.org 台灣繁體中文
    © 2025 Note | Powered by Superbs Personal Blog theme