エディタ」カテゴリーアーカイブ

SublimeText2 で ファイルをローカル保存 → サーバ反映の同期

sftpプラグインのインストール

cmd + shift + p
install でエンター
sfpt でエンター

sftpの設定

1.サイドバーに同期用ディレクトリを表示(D&D)
2.フォルダを右クリック
SFTP/FTP -> Map to Remote
3.リモート用の設定ファイルを作成、保存

{
    // 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",

    "save_before_upload": true,
    "upload_on_save": true,
    "sync_down_on_open": true,
    "sync_skip_deletes": false,
    "confirm_downloads": false,
    "confirm_sync": true,
    "confirm_overwrite_newer": false,

    "host": "***.***.***.***",
    "user": "********",
    "password": "*********",

    //"port": "22",

    "remote_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",
    //"dir_permissions": "775",

    //"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",
}

4.同期
サイドバーの同期するフォルダを右クリック
SFTP/FTP -> Sync Remote -> Local

Sublime Text2 の設定

{
“auto_complete_commit_on_tab”: true,
“auto_complete_delay”: 50,
“bold_folder_labels”: true,
“caret_style”: “phase”,
“color_scheme”: “Packages/Railscasts.tmTheme”,
“default_encoding”: “UTF-8”,
“draw_minimap_border”: true,
“draw_white_space”: “all”,
“font_size”: 16.0,
“highlight_line”: true,
“ignored_packages”:
[
],
“indent_to_bracket”: true,
“ingored_packages”:
[
],
“line_numbers”: true,
“line_padding_bottom”: 0,
“line_padding_top”: 0,
“margin”: 0,
“match_brackets_angle”: true,
“overlay_scroll_bars”: “enabled”,
“rulers”:
[
80
],
“scroll_speed”: 1.0,
“tab_size”: 2,
“translate_tabs_to_spaces”: false,
“trim_trailing_white_space_on_save”: true,
“vintage_start_in_command_mode”: true,
“word_wrap”: true
}