Skip to content

Instantly share code, notes, and snippets.

@luistelmocosta
Last active October 29, 2018 18:49
Show Gist options
  • Save luistelmocosta/6337d0f7584f55696bbe941b08587b03 to your computer and use it in GitHub Desktop.
Save luistelmocosta/6337d0f7584f55696bbe941b08587b03 to your computer and use it in GitHub Desktop.
# Path to oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Theme for zsh
ZSH_THEME="agnoster"
# oh-my-zsh framework plugins
plugins=(git)
source $ZSH/oh-my-zsh.sh
##### ZPLUG #####
local zplug_dir="$HOME/.zplug/repos/zplug/zplug"
if [[ ! -d ~/.zplug ]] then
git clone https://github.com/zplug/zplug $zplug_dir
fi
source $zplug_dir/init.zsh
# A next-generation plugin manager for zsh
zplug "zplug/zplug"
# Fish shell like syntax highlighting for Zsh
zplug "zsh-users/zsh-syntax-highlighting", defer:2
# ZSH port of Fish shell's history search feature
zplug "zsh-users/zsh-history-substring-search", defer:3
# Fish-like autosuggestions for zsh
zplug "zsh-users/zsh-autosuggestions"
# Additional completion definitions for Zsh
zplug "zsh-users/zsh-completions"
# Gradle completions
zplug "gradle/gradle-completion"
# An oh-my-zsh plugin to help remembering those aliases you defined once
zplug "djui/alias-tips"
# Easy setup of cdr for zsh
zplug "willghatch/zsh-cdr", defer:0
# zsh anything.el-like widget
zplug "zsh-users/zaw", defer:1
# Little script to create, navigate and delete bookmarks in Bash and Zsh, using the fuzzy finder fzf
zplug "urbainvaes/fzf-marks"
# This is a repository of themes for GNU ls (configured via GNU dircolors) that support Ethan Schoonover’s Solarized color scheme
zplug "seebi/dircolors-solarized"
# A modified version of oh-my-zsh's plugin colored-man-pages, optimized for solarized dark theme in terminal
zplug "zlsun/solarized-man"
# Command-line productivity booster, offers quick access to files and directories, inspired by autojump, z and v
export CACHE_DIR="${HOME}/.cache"
[[ ! -d "${CACHE_DIR}" ]] && mkdir -p "${CACHE_DIR}"
fasd_cache="${CACHE_DIR}/fasd-init-cache"
zplug clvv/fasd, \
as:command, \
hook-build:"./fasd --init zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install >| $fasd_cache", defer:1
#Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
zplug load
##### ----- #####
# fasd
if [ $commands[fasd] ]; then # check if fasd is installed
fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init auto >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
alias v="f -e \"$EDITOR\""
alias o='a -e xdg-open'
alias j='zz'
fi
# zsh-autosuggestions
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=yellow'
# bind ctrl+space to accept current suggestion
bindkey '^ ' autosuggest-accept
# User configuration
export DEFAULT_USER="$(whoami)"
## dircolors-solarized
eval $(dircolors "$ZPLUG_HOME/repos/seebi/dircolors-solarized/dircolors.ansi-dark")
##
#Ambient Variables
export BROWSER="opera"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment