Skip to content

Commit

Permalink
Added vim
Browse files Browse the repository at this point in the history
  • Loading branch information
milon committed May 30, 2022
1 parent b482632 commit 13ba311
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
12 changes: 9 additions & 3 deletions bin/dotfiles
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ BIN_NAME=$(basename "$0")
COMMAND_NAME=$1
SUB_COMMAND_NAME=$2

ARROW=""
ARROW=""
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m'

# Get dotfiles dir (so run this script from anywhere)
export my_dir="$HOME/.dotfiles"
export support_dir="$my_dir/support"
export dotfiles_dir="$HOME/.dotfiles"
export support_dir="$dotfiles_dir/support"

sub_help () {
echo -e "$ARROW Usage: ${YELLOW}$BIN_NAME <command>${NC}"
Expand All @@ -27,6 +27,7 @@ sub_help () {
echo " valet Run valet script"
echo " mac Run MacOS defaults script"
echo " xcode Run XCode script"
echo " vim Run vim script"
}

sub_update () {
Expand Down Expand Up @@ -82,6 +83,11 @@ sub_xcode () {
echo -e "${GREEN}$ARROW Success! Xcode command finished.${NC}"
}

sub_vim () {
. "$support_dir/vim.sh"
echo -e "${GREEN}$ARROW Success! Vim command finished.${NC}"
}

case $COMMAND_NAME in
"" | "-h" | "--help")
sub_help
Expand Down
34 changes: 17 additions & 17 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
#!/bin/zsh

set +x
#my_dir="$(dirname "$0")"
my_dir="$HOME/.dotfiles"
support_dir="$my_dir/support"
#dotfiles_dir="$(dirname "$0")"
dotfiles_dir="$HOME/.dotfiles"
support_dir="$dotfiles_dir/support"

cd $my_dir
cd $dotfiles_dir

# Load functions
source "$support_dir/functions.sh"

# Check and prompt for necessary dependencies
source "$support_dir/precheck.sh" && cd $my_dir
source "$support_dir/precheck.sh" && cd $dotfiles_dir

title 'XCODE'
source "$support_dir/xcode.sh" && cd $my_dir
source "$support_dir/xcode.sh" && cd $dotfiles_dir

title 'DEPENDENCIES'
source "$support_dir/dependencies.sh" && cd $my_dir
source "$support_dir/dependencies.sh" && cd $dotfiles_dir

title 'SYM LINKS'
source "$support_dir/sym_links.sh" && cd $my_dir
source "$support_dir/sym_links.sh" && cd $dotfiles_dir

title 'HOMEBREW'
source "$support_dir/brew.sh" && cd $my_dir
source "$support_dir/brew.sh" && cd $dotfiles_dir

title 'GIT'
source "$support_dir/git.sh" && cd $my_dir
source "$support_dir/git.sh" && cd $dotfiles_dir

title 'COMPOSER'
source "$support_dir/composer.sh" && cd $my_dir
source "$support_dir/composer.sh" && cd $dotfiles_dir

title 'VALET'
source "$support_dir/valet.sh" && cd $my_dir
source "$support_dir/valet.sh" && cd $dotfiles_dir

title 'GIT CLONE'
source "$support_dir/git_clone.sh" && cd $my_dir
source "$support_dir/git_clone.sh" && cd $dotfiles_dir

title 'NPM'
source "$support_dir/node.sh" && cd $my_dir
source "$support_dir/node.sh" && cd $dotfiles_dir

title 'VIM'
source "$support_dir/vim.sh" && cd $my_dir
source "$support_dir/vim.sh" && cd $dotfiles_dir

title 'MACOS SETTINGS'
source "$support_dir/mac_settings.sh" && cd $my_dir
source "$support_dir/mac_settings.sh" && cd $dotfiles_dir

title 'MANUAL STEPS'
source "$support_dir/manual_steps.sh" && cd $my_dir
source "$support_dir/manual_steps.sh" && cd $dotfiles_dir
4 changes: 3 additions & 1 deletion support/sym_links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ sym_links=(
[mackup.cfg]=$HOME/.mackup.cfg
)

mkdir $HOME/.vim

for key val in ${(kv)sym_links}; do
if test -f "$val"; then
echo "$val already exists; skipping symlink."
else
if [ -d "$val" ]; then
echo "$val already exists; skipping symlink."
else
ln -s $my_dir/files/$key $val
ln -s $dotfiles_dir/files/$key $val
fi
fi
done
Expand Down
3 changes: 3 additions & 0 deletions support/vim.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/zsh

# install vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

# install vundle or whatever other vim bundler
vim +PluginInstall +qall

0 comments on commit 13ba311

Please sign in to comment.