Created
May 23, 2019 17:56
-
-
Save bleggett/712ffa5342f682883bccfaf4e37eaee6 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 emacs="emacsclient -nw" | |
alias emc="emacsclient -n" | |
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/$@ ;} | |
# Yubikey GnuPG stuff | |
gpg-connect-agent updatestartuptty /bye | |
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 -)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment