SFTP for Sublime Text
Most settings are configured per-remote/server, however some remote only and others are configured on the plugin level.
The default remote and server config file is located at Packages/SFTP/SFTP.default-config. This can be customized by copying the file into Packages/Users/ and editing. Just be sure to compare it with the one in Packages/SFTP/ when new versions of SFTP are released.
Server settings are changed by going to themenu and selecting a server.
Remote settings are changed by selecting the sftp-config.json file in your folder.menu when right clicking on a folder in the side bar, or editing the
Tip: use the tab key to cycle through settings when first creating a config.
- If the connection should use
sftp. Changing this also automatically changes the port, if it is not specified.
- The domain name or IP address to connect to.
- The username to use when connecting to the
- The password to use. This is not necessary if using an
sftpconnection with SSH keys.
- The port number to connect to. This is only necessary if using a non-standard port for the
typespecified. When creating an
ftpsconnection, if the port is set to
990, an implicit SSL connection will be made, as opposed to the server and client negotiating the security.
- For the Remote workflow, the absolute path on the remote to map the current folder to. For the Server workflow, the default folder to display.
- The octal permissions to chmod files to. This should not start with a
- The octal permissions to chmod folders to. This should not start with a
- The number of additional connections to create to the server when performing the list commands that are used to determine what operations should be performed during a sync. Adding extra connections can drastically improve the performance of sync for large folder trees.
- The number of seconds to timeout after when trying to connect.
- The number of seconds between sending a dummy command to the server to keep the connection open. For FTP connections, the command is
NOOP, for SFTP connections, the command is
cd .. Setting this to
0disables keepalive commands.
- If pasv mode should be used for the FTP connection. If the first upload to an FTP server takes a long time, try setting this to false. While this is not set explicitly by default in the plugin, the Python ftp library defaults to using passive mode.
- The SSH private key file to use for an
sftpconnection. Linux and Mac will use the private key in ~/.ssh/ by default. On Windows this should be a .ppk file generated via Pageant.
- If the
sftp-serverexecutable should be invoked on the server via sudo. This requires password-less sudo on the server being connected to, and requires the server be running Unix.
- Raw command line flags to send to the sftp binary when on Linux or Mac, or the psftp.exe binary when on Windows. Each flag should be a separate entry in the list.
- If the modification times of files should be preserved when uploading and downloading. This setting may be
true(for uploads and downloads) and
"download_only"may be required since this functionality is not available on all FTP servers.
- The number of hours difference between the local machine and remote/server. This is normally determined automatically when connecting and should not normally need to be set.
- The remote encoding to use for unicode file paths. Normally this only needs to be adjusted for Windows FTP servers if using unicode file paths. See the python documentation for a valid list of encodings.
- This settings is used to parse the last modified timestamps on remote files. Normally this should not need to be adjusted. Show valid locales
Remote Only Settings
The following settings are not applicable to the server workflow.
- A boolean (
false) setting that controls whether or not files will be saved before uploading. This only affects files uploaded via the keyboard command.
- If files should be automatically uploaded when saved. Files that match the
ignore_regexespattern are not automatically uploaded.
- If files that are approximately the same age should be transfered when syncing. The FTP and SFTP protocols do not report modification time beyond the granularity of the minute, meaning that files that are the "same age" may, in fact, be different.
- When a file is opened, the remote file modification time will be checked. If it is newer, the user will be prompted if they wish to download it.
- When performing Sync Up and Sync Down command, skip looking for files to delete.
- If a yes/no confirmation should be presented to the user when downloading a file or folder.
- If a yes/no confirmation should be presented to the user when performing sync commands.
- If the user should be presented with a yes/no confirmation when uploading a file with a modification time that is older than the version of the file on the server. This only works when uploading individual files. Please note that setting this to
truewill have a slight affect on performance since a remote file listing will need to be performed on each file upload.
- A list of regular expressions to compare with file and folder paths to see if they should be ignored. The complete path to the file or folder will be compared to this regular expression. This uses the Python re module, and regular expression must be compatible with that. A literal backslash requires four backslashes since both JSON and regular expressions require backslashes to be escaped.
["\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json", "sftp-settings\\.json", "/venv/", "\\.svn", "\\.hg", "\\.git", "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"]
There are a handful of settings available for SFTP, and they can be changed by selecting the menu item. Customized settings should be saved to sibling menu item to prevent them from being overridden during an upgrade.
- Controls when the output panel is hidden.
trueonly shows the output panel upon error.
falsealways shows the output panel and never hides it. (number) shows the output panel and hides it after (number) seconds.
- A list containing the path to an external diff program, combined with the the necessary command line arguments. If no
diff_commandis provided, the diff functionality built into Sublime Text will be used. For command line arguments,
%1$swill be replaced with the path to the local file and
%2$swill be replaced with the path to the temp file representing the remote file.
- If the temporary folder created for perfoming remote diff operations should be deleted when the diff is complete. This only affects functionality when the
diff_commandsetting is used. If set to
falsethen the user is responsible for removing temp folders.
- The number of milliseconds (1000 per second) between each file stat when using the Monitor File command. This should only need to be tweaked if experiencing disk performance issues.
- Enable experimental ssl module for Linux users. This is required for FTPS support. Sublime must be restarted after changing this. If Sublime becomes unstable after enabling this, please set it back to
falseand create a request for assistance in compiling a custom
_ssl.sofor your distribution.
- Adds debugging output to the Sublime Text console. This can be useful when experiencing trouble connecting to a server. Setting this to
truewill log license information and commands being sent back and forth. Setting this to
2will add debugging about internal operations that is useful for bug reports.
- A file to save debug messages to, instead of printing them to the console.
- The absolute filesystem path to the
git.exeon Windows) program.
- The absolute filesystem path to the
hg.exeon Windows) program.
- The absolute filesystem path to the
svn.exeon Windows) program.
- A setting used to tweak how many milliseconds to wait on Mac before checking to see if a file load event was triggered for fully loading the file (with a tab). Sublime Text on Mac seems to suffer from a delay before the tab is opened (at least according to the API), so this setting can help users fix issues if
sync_down_on_opendoes not alway seem to work.
All three binary path settings will normally will be auto-detected and only need to be set if an error indicates such.