sublime FTP

Published by onesixx on

sFTP plugin

FTP, FTPS, SFTP 지원 :유료이므로 라이센스키를 입력하지 않으면 구매권유 팝업.

: 파일을 바로바로 직접 접근해서 처리하지 않고,   소스를 먼저 다운을 받아 로컬상에서 처리를 하고 업로드 하는 방식 
  ==> sync 를 제공하긴 하지만 기본적으로 백업을 겸하는 안정적인 방식

설정

0. sftp 설정정보 확인

1.로컬에 적당한 (서버의 소스가 저장될) 폴더를 미리 만들어 둔다

2. File > Open folder – Browse and select your folder. 
    File > Open Folder 에서  미리 만들어둔 폴더지정하여 Open한다.

4. 설정파일

 – View > Sidebar > Show sidebar (ctrl 누른상태에서 k then b). 

 Sidebar에서 해당 폴더를 오른클릭하여,  SFTP/FTP > Map to Remote 를 선택  
 sftp 환경설정을 할 json 파일(sftp-config.json )을 만든다

여기에 서버정보를 입력하고 저장한다.

설정파일


    // The tab key will cycle through the settings when first created 
    // Visit http://wbond.net/sublime_packages/sftp/settings for help

“type”: “sftp”,                   // sftp, ftp or ftps 
“save_before_upload”: true , //저장전 업로드      
“upload_on_save”: true ,      //업로드시 저장 false 
“sync_down_on_open”: true , //다운로드 및 오픈하면서 동기화할지 여부 false 즉, Sync 할때 초기값 서버값 받기(t),로컬값 유지(f)
“sync_skip_deletes”: false,    //삭제한 파일은 동기화에 제외시킬지 여부 
“sync_same_age” : true , 
“confirm_downloads”: false,  //다운로드 확인 여부    
“confirm_sync”: true ,             //true일때는 Sync할껀지 물어봄. False이면 안물어보고 sync_down_on_open값에 따라 진행
“confirm_overwrite_newer”: false,  //확인된 파일덮어쓸지 체크하여 새로만들지 여부

    “host”: “example.com”, 
    “user”: “username”, 
    “password”: “password”, 
    “port”: “22”, 
    “remote_path”: “/example/path/”, 
    “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”: “664”,                   //”777″,
    //”dir_permissions”: “775”,                    //”777″,
    //”extra_list_connections”: 0,

    “connect_timeout”: 30, 
    //”keepalive”: 120, 
    //”ftp_passive_mode”: true, 
    //”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”, 
}

설정완료후 저장

5. Browse Remote 로 폴더 확인

6. 폴더액션> 다운로드 동작 선택

해당 폴더의 하위 폴더를 클릭하여 오른쪽 마우스버튼을 클릭하면 
Upload File 내지는 Download File , Upload Folder , Download Folder 등이 보인다.

거기에서 다운받을 폴더 내지는 파일이 있으면 해당 메뉴를 선택한다.

<참조> 
sublime TEXT2 – sftp 설치 및 설정 
http://www.brentmountford.com/tutorials/sublime-text-2-sftp-setup-usage/ 
http://wbond.net/sublime_packages/sftp 
the SFTP plugin for sublime text 2 by Will Bond . 
http://www.macdrifter.com/2012/08/working-remotely-with-sublime-text-and-bbedit-ftp-access.html
http://wbond.net/sublime_packages/sftp/usage#command-Show_SFTP_Panel

Stop FTP

ctrl + alt + u + x
Stop the current SFTP/FTP server activity (connection, upload or download)

한글문제

한글 파일은 아래와 같이 “ignore_regexes” 에 “[\uAC00-\uD7A3]” 추가
엑셀이나 fst데이터 파일 제외하고 싶을때는 “\\.xlsx” “\\.fst” 추가
“[\uAC00-\uD7A3]”, “\.xlsx”, “.\.fst”, “.\.rds”

"ignore_regexes": [
        "[\\uAC00-\\uD7A3]",
        "\\\\.xlsx",
        "\\\\.fst",
    ],

Key Bindings

In addition to the menu-driven operation, Sublime SFTP offers key bindings for all commands.

Remote Workflow

Upload File Win/Linux: ctrl+alt+u+f 
OS X: ctrl+cmd+u+f 
Upload the current file Upload Changed Files Win/Linux: ctrl+alt+u+c 
OS X: ctrl+cmd+u+c 
Upload all files changed or created since the last commit to your VCS (SVN, Git or Hg) Upload Open Files Win/Linux: ctrl+alt+u+n 
OS X: ctrl+cmd+u+n 
Upload all open files that are configured with an SFTP/FTP remote Download File Win/Linux: ctrl+alt+u+o 
OS X: ctrl+cmd+u+o 
Download the remote version of the selected file and overwrite the local copy Upload Folder Win/Linux: ctrl+alt+u+r 
OS X: ctrl+cmd+u+r 
Uploading the entire folder the current file is located in can be accomplished by pressing ctrl+alt+u+r on Windows and Linux, or ctrl+cmd+u+r on OS X. Download Folder Win/Linux: ctrl+alt+u+e 
OS X: ctrl+cmd+u+e 
Download the entire folder Diff Remote File Win/Linux: ctrl+alt+u+i 
OS X: ctrl+cmd+u+i 
Download the remote version of a file to a temp location and diff it with the local version Sync Local -> Remote Win/Linux: ctrl+alt+u+y 
OS X: ctrl+cmd+u+y 
Compare file modification times and confirm actions before uploading the selected file or folder. This will also delete files off of the remote server that do not exist locally. Sync Remote -> Local Win/Linux: ctrl+alt+u+d 
OS X: ctrl+cmd+u+d 
Compare file modification times and confirm actions before downloading the selected file or folder. This will also delete files off of the local machine that do not exist remotely. Sync Both Directions Win/Linux: ctrl+alt+u+b 
OS X: ctrl+cmd+u+b 
Compare file modification times and confirm actions before uploading/downloading the selected file or folder. This will never delete files, and will always perform the action that causes the newest file to be present in both locations. Monitor File Win/Linux: ctrl+alt+u+m 
OS X: ctrl+cmd+u+m 
Watch the file for modifications (from Sublime or other applications). When the file modification time changes, the file will be uploaded. This was designed to be used with programs such as LiveReload and CSS compliers. The file must remain open in Sublime to be monitored. Once it is closed, monitoring stops. Browse Remote Win/Linux: ctrl+alt+u+w 
OS X: ctrl+cmd+u+w 
Open the server quick panel browser at the remote folder corresponding to the selected file or folder

Server Workflow

Setup Server Win/Linux: ctrl+alt+r+s 
OS X: ctrl+cmd+r+s 
Setup a new server. Browse Server Win/Linux: ctrl+alt+r+b 
OS X: ctrl+cmd+r+b 
List the servers, with an option to setup a new one. Last Server Win/Linux: ctrl+alt+r+n 
OS X: ctrl+cmd+r+n 
Show the current directory listing for the last used server. Edit Server Win/Linux: ctrl+alt+r+e 
OS X: ctrl+cmd+r+e 
List the servers for the purpose of editing. Delete Server Win/Linux: ctrl+alt+r+d 
OS X: ctrl+cmd+r+d 
List the servers for the purpose of deletion.

Both Workflows

Show SFTP Panel Win/Linux: ctrl+alt+u+s 
OS X: ctrl+cmd+u+s 
Show the SFTP activity panel Cancel Win/Linux: ctrl+alt+u+x 
OS X: ctrl+cmd+u+x 
Stop the current SFTP/FTP server activity (connection, upload or download)

All keyboard shortcuts can be customized by going to the Preferences > Package Settings > SFTP menu and selecting Key Bindings – Default. Shortcuts to be customized should be copied into Key Bindings – User and customized there. This will prevent updates from overriding the customizations

Categories: Tool-SW

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x