Created
July 7, 2020 16:48
-
-
Save bleggett/c23fc2d48c55a5dc7a6a86878cd19e25 to your computer and use it in GitHub Desktop.
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
## HOW TO DO DADGUM ENV VARS FOR UI AND SHELL APPS ON macOS: | |
# 1. If you want to OVERRIDE existing paths, prepend to existing path in ~/.zprofile | |
# 2. If you want to ADD NEW paths that do not need to override system paths, append to existing path in ~/.zshenv | |
#Path to your oh-my-zsh installation. | |
export ZSH=~/.oh-my-zsh | |
export FIREFOX_BIN=/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin | |
alias emc="emacsclient -n" | |
#Fix stupid gpg-agent hangs | |
alias kickgpg="gpgconf --kill gpg-agent && gpgconf --launch gpg-agent" | |
unalias run-help | |
autoload run-help | |
HELPDIR=/usr/local/share/zsh/help | |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=(git brew npm osx docker tmux vi-mode history-substring-search) | |
# User configuration | |
source $ZSH/oh-my-zsh.sh | |
source ~/.iterm2_shell_integration.zsh | |
function gi() { curl -L -s https://www.gitignore.io/api/$@ ;} | |
bindkey "^[[A" history-substring-search-up | |
bindkey "^[[B" history-substring-search-down | |
#Turn on ZSH Vim mode | |
bindkey -v | |
export KEYTIMEOUT=1 | |
# Do funky vim mode prompt stuff (only works for terms that support DECSCUSR e.g. iTerm) | |
function zle-keymap-select zle-line-init | |
{ | |
# change cursor shape in iTerm2 | |
case $KEYMAP in | |
vicmd) print -n -- "\E]50;CursorShape=0\C-G";; # block cursor | |
viins|main) print -n -- "\E]50;CursorShape=1\C-G";; # line cursor | |
esac | |
zle reset-prompt | |
zle -R | |
} | |
function zle-line-finish | |
{ | |
print -n -- "\E]50;CursorShape=0\C-G" # block cursor | |
} | |
zle -N zle-line-init | |
zle -N zle-line-finish | |
zle -N zle-keymap-select | |
eval "$(rbenv init -)" | |
# added by travis gem | |
[ ! -s /Users/blegget1/.travis/travis.sh ] || source /Users/blegget1/.travis/travis.sh | |
# Added for Emacs libvterm | |
vterm_printf(){ | |
if [ -n "$TMUX" ]; then | |
# Tell tmux to pass the escape sequences through | |
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) | |
printf "\ePtmux;\e\e]%s\007\e\\" "$1" | |
elif [ "${TERM%%-*}" = "screen" ]; then | |
# GNU screen (screen, screen-256color, screen-256color-bce) | |
printf "\eP\e]%s\007\e\\" "$1" | |
else | |
printf "\e]%s\e\\" "$1" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment