Sublime Text 2:将保存/备份文件复制到另一个文件夹

时间:2012-07-02 09:00:16

标签: rsync sublimetext sublimetext2

在Adobe Dreamweaver中,可以将已保存文件的自动复制设置到另一个项目特定位置。如何使用Sublime Text 2实现这一目标?

我在Windows 7上,我不想安装第三方工具(如Windows的rsync)来观看文件夹,然后对更改采取措施。我只想将文件保存到两个位置(本地SVN存储库和第二个Windows远程共享文件夹)。

是否有插件可以执行此操作?

3 个答案:

答案 0 :(得分:6)

现在有一个适合我需要的插件:SublimeFileSync

答案 1 :(得分:0)

您可以查看Automatic Backup Plugin。它不会在项目特定的位置备份文件,但每次保存文件时都是自动保存备份的好方法。

答案 2 :(得分:0)

https://github.com/akalongman/sublimetext-autobackups

配置选项:

{
    // Don't make changes to this file directly as they can get wiped out when the
    // plugin is updated. Instead transfer what you need to the 'Settings - User' file.

    // The directory where we'll keep our backups. If empty, we'll try to put them in
    // ~/sublime_backups
    "backup_dir": "~/sublime_backups",

    // If true, also save a backup copy any time a file is opened (if backup file not exists)
    "backup_on_open_file": true,

    // If true, backups saved per day, in separate folders, for example ~/sublime_backups/2013-05-23/myfile.php
    "backup_per_day": true,

    // If set, backups saved per second. possible values: false, "folder" or "file"
    // false - disabled backup per second
    // "folder" - backup example D:/Sublime Text Backups/2013-05-23/095034/myfile.php
    // "file" - backup example D:/Sublime Text Backups/2013-05-23/myfile_095034.php
    // to use this feature, you must have enabled backup_per_day setting
    "backup_per_time": "file",

    // Files larger than this many bytes won't be backed up.
    "max_backup_file_size_bytes": 262144, // = 256 KB

    // Files older than X days will be deleted. If 0 - auto delete disabled
    "delete_old_backups": 0, // days to delete

    // If true, backup file opened in same line as cursor in original file
    "open_in_same_line": true,

    // If true, show backup previews (only in ST3)
    "show_previews": true

}