Move some private vim undo/backup paths out of vimrc and into a sourced file

This commit is contained in:
2020-01-06 13:07:39 -05:00
parent f0d80c41d6
commit 70a9fe5aa6
8 changed files with 53 additions and 92 deletions

42
install
View File

@@ -1,32 +1,16 @@
#!/bin/bash
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
BLUE="$(tput setaf 4)"
BOLD="$(tput bold)"
NORMAL="$(tput sgr0)"
else
RED=""
GREEN=""
YELLOW=""
BLUE=""
BOLD=""
NORMAL=""
fi
source "script_helpers/all.sh"
set -e
cwd=$PWD
platform=`uname`
if [[ $platform != 'Linux' && $platform != 'Darwin' ]]; then
printf "${RED}This is only supported on Linux or OS X.${NORMAL}\n"
exit
os_is_windows is_windows
if [[ $is_windows -eq 0 ]]; then
error "This is only supported on Linux or MacOS.\n"
exit 1
fi
setup_dotfile_repo() {
@@ -39,13 +23,9 @@ setup_dotfile_repo() {
mkdir -p $HOME/tmp
}
link_file() {
link() {
file=$1
dest="$HOME/.$file"
if [ ! -e $dest ]; then
printf "${YELLOW}Creating ${file} symlink${NORMAL}\n"
ln -s "$HOME/.dotfiles/$file" $dest
fi
link_file "$HOME/.dotfiles/$file" "$HOME/.$file" 0
}
setup_git() {
@@ -57,7 +37,7 @@ setup_git() {
for file in "${FILES[@]}"
do
link_file "$file"
link "$file"
done
}
@@ -83,7 +63,7 @@ setup_zsh() {
for file in "${FILES[@]}"
do
link_file "$file"
link "$file"
done
}
@@ -96,7 +76,7 @@ setup_vim() {
for file in "${FILES[@]}"
do
link_file "$file"
link "$file"
done
}
@@ -109,7 +89,7 @@ setup_misc() {
for file in "${FILES[@]}"
do
link_file "$file"
link "$file"
done
}