Skip to content

Commit

Permalink
speed up zsh startup time
Browse files Browse the repository at this point in the history
  • Loading branch information
ornotandrew committed Dec 3, 2020
1 parent 1a41fe4 commit 12fa4ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
28 changes: 13 additions & 15 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="wraithy"
plugins=(docker docker-compose mercurial fancy-ctrl-z zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh

# Lazy load bigger plugins
function kubectl() {
if ! type __start_kubectl >/dev/null 2>&1; then
source <(command kubectl completion zsh)
fi
command kubectl "$@"
}
export NVM_LAZY_LOAD_EXTRA_COMMANDS=('vim', 'nvim')
export NVM_LAZY_LOAD="true"
plugins=(zsh-nvm fancy-ctrl-z zsh-syntax-highlighting)

source $ZSH/oh-my-zsh.sh

# Path
path+="$HOME/.local/bin"
Expand Down Expand Up @@ -40,6 +36,7 @@ alias sba="source env/bin/activate && [ -f env/vars.sh ] && source env/vars.sh"

# Completion
zstyle ':completion:*' users andrew root
autoload bashcompinit && bashcompinit

# FZF bindings
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
Expand Down Expand Up @@ -72,6 +69,13 @@ export XDG_CONFIG_HOME=~/.config

# Scripts for gcloud and shell
# ============================
function kubectl() {
if ! type __start_kubectl >/dev/null 2>&1; then
source <(command kubectl completion zsh)
fi
command kubectl "$@"
}

kpatch() {
kubectl patch deployment $1 -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
}
Expand All @@ -92,19 +96,13 @@ bindkey '^x^x' edit-command-line

# nvm
export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" # This loads nvm
export NODE_PATH="$(npm config get prefix)/lib/node_modules"

# dotnet
# export DOTNET_ROOT=/opt/dotnet
# path+="$DOTNET_ROOT"
path+="/opt/mssql-tools/bin"
export PATH

# aws cli
autoload bashcompinit && bashcompinit
complete -C '/usr/local/bin/aws_completer' aws

# Blacklist certain things from getting into the history file
setopt histignorespace
export HISTORY_IGNORE="*--password*"
5 changes: 3 additions & 2 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Plug 'tpope/vim-vinegar'
Plug 'preservim/nerdtree'
Plug 'ryanoasis/vim-devicons'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'Xuyuanp/nerdtree-git-plugin'
" Plug 'Xuyuanp/nerdtree-git-plugin'

Plug 'sjl/gundo.vim'
Plug 'junegunn/goyo.vim'
Expand Down Expand Up @@ -88,7 +88,8 @@ let g:coc_global_extensions = [
\ 'coc-python',
\ 'coc-markdownlint',
\ 'coc-json',
\ 'coc-css'
\ 'coc-css',
\ 'coc-html'
\ ]


Expand Down

0 comments on commit 12fa4ac

Please sign in to comment.