From 7c7d4c506ea79d8121f7d2ed4f159eb31def4d87 Mon Sep 17 00:00:00 2001 From: Jidbo Date: Wed, 11 Dec 2019 22:38:05 +0100 Subject: [PATCH] cleanup zshrc and add custom plugins option --- .gitignore | 1 - shell/.gitignore | 2 ++ shell/localcommands.example | 1 + shell/plugins.example | 8 ++++++++ shell/zshrc | 26 ++++++++++++++++---------- 5 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 shell/.gitignore create mode 100644 shell/localcommands.example create mode 100644 shell/plugins.example diff --git a/.gitignore b/.gitignore index 3f0861e..347b774 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -localcommands vim/bundle/* vim/autoload diff --git a/shell/.gitignore b/shell/.gitignore new file mode 100644 index 0000000..23b1fbf --- /dev/null +++ b/shell/.gitignore @@ -0,0 +1,2 @@ +localcommands +plugins diff --git a/shell/localcommands.example b/shell/localcommands.example new file mode 100644 index 0000000..dca1e02 --- /dev/null +++ b/shell/localcommands.example @@ -0,0 +1 @@ +alias vi="vim" diff --git a/shell/plugins.example b/shell/plugins.example new file mode 100644 index 0000000..60a14d1 --- /dev/null +++ b/shell/plugins.example @@ -0,0 +1,8 @@ +# plugins +plugins=( + git + pip + screen + artisan + fzf +) diff --git a/shell/zshrc b/shell/zshrc index 356619e..3bb9042 100644 --- a/shell/zshrc +++ b/shell/zshrc @@ -4,16 +4,22 @@ export ZSH="$HOME/.oh-my-zsh" ZSH_THEME="robbyrussell" # plugins -plugins=( - git - pip - screen - fzf - artisan -) +if [ -f ~/.dotfiles/shell/plugins ] +then + source ~/.dotfiles/shell/plugins +else + # plugins + plugins=( + git + pip + screen + z + ) +fi source $ZSH/oh-my-zsh.sh + # User configuration # Helper Functions @@ -27,14 +33,14 @@ export EDITOR='vim' # aliases alias ll='ls -l' -alias vi='vim' alias la='ls -la' alias :q='exit' +alias fresh="source ~/.zshrc" # localcommands -if [ -f ~/.dotfiles/localcommands ] +if [ -f ~/.dotfiles/shell/localcommands ] then - source ~/.dotfiles/localcommands + source ~/.dotfiles/shell/localcommands fi # Tmuxinator autocomplete