diff --git a/.aliases b/.aliases.symlink similarity index 100% rename from .aliases rename to .aliases.symlink diff --git a/.ideavimrc b/.ideavimrc.symlink similarity index 100% rename from .ideavimrc rename to .ideavimrc.symlink diff --git a/.vimrc b/.vimrc.symlink similarity index 99% rename from .vimrc rename to .vimrc.symlink index 8c1a0a1..454ebda 100644 --- a/.vimrc +++ b/.vimrc.symlink @@ -61,13 +61,6 @@ filetype plugin indent on " something messes up this setting in the plugins set expandtab - - -let mapleader = "\" - -nmap O -nmap o - inoremap inoremap inoremap @@ -75,6 +68,11 @@ inoremap noremap noremap +let mapleader = "\" + +nmap O +nmap o + " presentation mode noremap :silent bp :redraw! noremap :silent bn :redraw! diff --git a/.zshenv.symlink b/.zshenv.symlink new file mode 100644 index 0000000..84f6a45 --- /dev/null +++ b/.zshenv.symlink @@ -0,0 +1 @@ +export PATH=$HOME/bin:/usr/local/bin:$PATH diff --git a/.zshrc b/.zshrc.symlink similarity index 94% rename from .zshrc rename to .zshrc.symlink index ec2cd7f..930f5ae 100644 --- a/.zshrc +++ b/.zshrc.symlink @@ -41,3 +41,8 @@ eval $(keychain --eval --quiet) # direnv eval "$(direnv hook zsh)" + +# load aliases +if [ -f ~/.aliases ]; then + . ~/.aliases +fi diff --git a/install-dotfiles.sh b/install-dotfiles.sh new file mode 100644 index 0000000..f2efa54 --- /dev/null +++ b/install-dotfiles.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +DOTFILES_ROOT=$(pwd) + +#symlink dotfiles into home directory +install_dotfiles () { + + local overwrite_all=false backup_all=false skip_all=false + + for src in $(find "$DOTFILES_ROOT/" -maxdepth 2 -name '*.symlink') + do + dst="$HOME/$(basename "${src%.*}")" + ln -s "$src" "$dst" + done +} + +mkdir -p ~/.config # in case if there is not any custom config +mkdir -p ~/.vim # in case if there is not any .vim home folder +mkdir -p /opt/jenv/completions # in case if it is not existed + +git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +install_dotfiles + +#setup oh-my-zsh +git clone https://github.com/robbyrussell/oh-my-zsh ~/.oh-my-zsh +cd ~/.oh-my-zsh/custom/plugins + +git clone git://github.com/zsh-users/zsh-syntax-highlighting.git + +cd $DOTFILES_ROOT + +#setup submodules of this repository +git submodule init +git submodule update + +# symlink config folder +ln -s $DOTFILES_ROOT/.config/* ~/.config + +# symlink bin folder +mkdir ~/bin +ln -s $DOTFILES_ROOT/bin/* ~/bin + +# symlink .oh-my-zsh themes folder +ln -s $DOTFILES_ROOT/.oh-my-zsh/custom/themes/* ~/.oh-my-zsh/custom/themes + +# symlink custom zsh config +ln -s $DOTFILES_ROOT/.oh-my-zsh/custom/*.zsh ~/.oh-my-zsh/custom