rsync-project-mode
is a minor mode to automatically rsync entire projects to remote hosts in Emacs.
It also offers an option to automatically synchronize the current project in the background, leveraging watchexec to monitor file changes and rsync
for efficient incremental updates.
- Install Emacs 28 or higher version
- Install Elisp dependencies:
- f
- Install watchexec
- Download this repository using git clone, and replace the load-path path in the configuration below.
- Add the following code to your configuration file ~/.emacs:
(add-to-list 'load-path "<path-to-rsync-project-mode>") (require 'rsync-project-mode) ;; Need sync when save buffer. (setq rsync-project-default-auto-rsyncp t) ;; Whether to read the contents of =.gitignore= as filter content when creating a new remote project (setq rsync-project-default-gitignorep t) (add-hook 'prog-mode-hook 'rsync-project-mode)
rsync-project-dispatch
: a transient menu
rsync-project-add
: add now project rsync remote config.rsync-project-remove
: remove now project rsync remote config.rsync-project-sync-all
: rsync all.rsync-project-add-ignore
: add ignorersync-project-remove-ignore
: remove ignore
rsync-project-auto-rsyncp
: Whether to activate a hook that synchronizes the project after each save.rsync-project-list-file
: File in which to save the list of known projects.rsync-project-default-gitignorep
: Whether to read the contents of.gitignore
as filter content when creating a new remote project.
- rsync-mode: Use
.dir-locals.el
store remote config.