Created
November 10, 2018 00:57
my ZSHCONFIG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=/usr/local/bin:$PATH | |
# If you come from bash you might have to change your $PATH. | |
export ZSH="/Users/<user>/.oh-my-zsh" | |
ZSH_THEME="agnoster" | |
export UPDATE_ZSH_DAYS=7 | |
plugins=( | |
git | |
) | |
source $ZSH/oh-my-zsh.sh | |
export LANG=en_US.UTF-8 | |
export EDITOR='nvim' | |
export SSH_KEY_PATH="~/.ssh/rsa_id" | |
alias zshconfig="nvim ~/.zshrc" | |
alias ohmyzsh="nvim ~/.oh-my-zsh" | |
prompt_context() {} | |
prompt_dir() { | |
prompt_segment blue black '%c' | |
} | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
function ffz() { | |
fzf --preview '[[ $(file --mime {}) =~ binary ]] && | |
echo {} is a binary file || | |
(highlight -O ansi -l {} || | |
coderay {} || | |
rougify {} || | |
cat {}) 2> /dev/null | head -500' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
ffz
function creates a preview page to the right side of the window so we can see the contents of the file. It also pipes the results through one of three code highlighters: highlight, code ray or rougify, which allows the previews to have Code highlighting as well. Pretty neat!