From fa4b6f0870e80a52fc90762f6ea3aa428917b8e8 Mon Sep 17 00:00:00 2001 From: Peter Dahlberg Date: Fri, 4 Dec 2015 10:34:12 +0100 Subject: [PATCH] move vimrc --- install_files.py | 11 ++++++----- .vimrc => vim/vimrc | 0 2 files changed, 6 insertions(+), 5 deletions(-) rename .vimrc => vim/vimrc (100%) diff --git a/install_files.py b/install_files.py index d3988f4..043ffea 100755 --- a/install_files.py +++ b/install_files.py @@ -10,17 +10,18 @@ def install_vim(pdotfiles, force=False): phome = Path(os.path.expanduser("~")).resolve() phome_vimrc = phome / Path(".vimrc") + prelvimrc = Path("vim/vimrc") try: - pdotfiles_vimrc = pdotfiles.resolve().relative_to(phome.resolve()) / Path(".vimrc") + pdotfiles_vimrc = pdotfiles.resolve().relative_to(phome.resolve()) / prelvimrc except ValueError: - pdotfiles_vimrc = pdotfiles / Path(".vimrc") + pdotfiles_vimrc = pdotfiles / prelvimrc - if force and phome_vimrc.exists(): - phome_vimrc.unlink() + if force and phome_vimrc.is_symlink(): + phome_vimrc.unlink() # only kill symlinks if phome_vimrc.exists(): - print('.vimrc already there') + print('.vimrc already there!') else: print("Symlinking {} to {}".format(phome_vimrc, pdotfiles_vimrc)) phome_vimrc.symlink_to(pdotfiles_vimrc) diff --git a/.vimrc b/vim/vimrc similarity index 100% rename from .vimrc rename to vim/vimrc