modifications to obtain working environment

This commit is contained in:
2016-06-19 15:31:31 +01:00
parent 0bf1741698
commit 941a089d66
17 changed files with 41 additions and 103 deletions

View File

@@ -8,8 +8,6 @@ else # OS X `ls`
colorflag="-G"
fi
alias vim="nvim"
# Filesystem aliases
alias ..='cd ..'
alias ...='cd ../..'
@@ -27,9 +25,6 @@ alias grep='grep --color=auto'
alias df='df -h' # disk free, in Gigabytes, not bytes
alias du='du -h -c' # calculate disk usage for a folder
# Applications
alias ios='open -a /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
@@ -65,14 +60,3 @@ alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && k
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
alias "$method"="lwp-request -m '$method'"
done
# Stuff I never really use but cannot delete either because of http://xkcd.com/530/
alias stfu="osascript -e 'set volume output muted true'"
alias pumpitup="osascript -e 'set volume 10'"
# Kill all the tabs in Chrome to free up memory
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
alias chrome="/Applications/Google\\ \\Chrome.app/Contents/MacOS/Google\\ \\Chrome"
alias canary="/Applications/Google\\ Chrome\\ Canary.app/Contents/MacOS/Google\\ Chrome\\ Canary"

View File

@@ -30,5 +30,9 @@ bindkey '^[[3~' delete-char
bindkey '^[^N' newtab
bindkey '^?' backward-delete-char
# remap reverse search
bindkey -v
bindkey '^R' history-incremental-search-backward
fpath=($ZSH/functions $fpath)
autoload -U $ZSH/functions/*(:t)

View File

@@ -1,2 +0,0 @@
#compdef c
_files -W $CODE_DIR -/

View File

@@ -1 +0,0 @@
cd $CODE_DIR/$1

View File

@@ -48,7 +48,6 @@ git_arrows() {
echo $arrows
}
# indicate a job (for example, vim) has been backgrounded
# If there is a job in the background, display a ✱
suspended_jobs() {
@@ -63,8 +62,8 @@ suspended_jobs() {
precmd() {
vcs_info
print -P '\n%F{205}%~'
print -P '\n%F{145}%~'
}
export PROMPT='%(?.%F{205}.%F{red})%f '
export PROMPT='%(?.%F{145}.%F{red})%f '
export RPROMPT='`git_dirty`%F{241}$vcs_info_msg_0_%f `git_arrows``suspended_jobs`'

0
zsh/spectrum.zsh Normal file → Executable file
View File

View File

@@ -13,7 +13,7 @@ if [[ -d ~/code ]]; then
fi
# source all .zsh files inside of the zsh/ directory
for config ($ZSH/**/*.zsh) source $config
for config ($ZSH/*.zsh) source $config
if [[ -a ~/.localrc ]]; then
source ~/.localrc