Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 44 lines (32 sloc) 1.21 KB
#! /bin/zsh
# add to ~/bin: ln -s ~/configs/pyvim/ ~/bin/
# Sync my vim config to a remote host specified.
# Steps:
# 1. cd ~/configs/pyvim
# 2. git co portable
# 3. rsync -avz --delete -e ssh ~/configs/pyvim dc:~
# 4. ln -s vim/vim .vim
# 5. ln -s vim/.vimrc .vimrc
# Notes:
# Using a git branch since some stuff I run locally won't be on remote hosts
# This setups the files in a directory on the host called vim and then it
# symlinks the .vimrc and vim directory to the user's home dir
# This currently syncs the git stuff as well, at some point should probably do
# some fancy export to a tmp dir and rsync those files over instead
git checkout $VIMBRANCH
# get the hostname
if [ $# -ne 1 ]
echo "Usage: vimsync HOSTNAME"
return 65
rsync -avz --delete -e ssh ~/configs/pyvim $HOSTNAME:~/
ssh $HOSTNAME 'rm -r ~/.vimrc ~/.vim ; ln -s pyvim/vim .vim && ln -s pyvim/vimrc .vimrc'
# make sure we restore our local vim config to master
git checkout master
# @todo move the above into a shell function, setup a list of hosts, and loop
# through them to sync all hosts at once
Something went wrong with that request. Please try again.