From 8c10ebc33031630a3940da80eced2d62f87d1610 Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 25 Jan 2016 14:41:47 +0100 Subject: [PATCH] added a few configs and a private zshrc --- tmux.conf | 17 +++++++++++++++++ zshrc | 7 ++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tmux.conf b/tmux.conf index b82883a..528e72c 100644 --- a/tmux.conf +++ b/tmux.conf @@ -19,3 +19,20 @@ bind m \ bind M \ set -g mouse off \;\ display 'Mouse: OFF' + +# Copy-paste integration +set-option -g default-command "reattach-to-user-namespace -l zsh" + +# Use vim keybindings in copy mode +setw -g mode-keys vi + +# Setup 'v' to begin selection as in Vim +bind-key -t vi-copy v begin-selection +bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" + +# Update default binding of `Enter` to also use copy-pipe +unbind -t vi-copy Enter +bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" + +# Bind ']' to use pbpaste +bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" diff --git a/zshrc b/zshrc index 459347d..c528283 100644 --- a/zshrc +++ b/zshrc @@ -29,7 +29,7 @@ export PYTHONSTARTUP=~/.pythonrc export NODE_PATH=/usr/local/lib/node_modules export TERM=rxvt export LC_ALL=$LANG -alias ..="cd .." +export JAVA_HOME=`/usr/libexec/java_home -v 1.8` alias vi="stty stop '' -ixoff ; vim" alias gcc="gcc-5" alias g++="g++-5" @@ -65,8 +65,8 @@ alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo alias dud="du -d 1" alias loc="cloc *" alias ls="ls -a" -alias exit="killall tmux" alias quit="exit" +#alias exit="killall tmux" alias howmuch="git ls-tree -r -z --name-only HEAD -- . | xargs -0 -n1 git blame --line-porcelain HEAD | grep '^author '| sort | uniq -c | sort -nr" alias clipboard_clear="echo lol | pbcopy" alias vlc="/Applications/VLC.app/Contents/MacOS/VLC" @@ -74,7 +74,6 @@ alias tmv="tmux split-window" alias tmh="tmux split-window -h" alias tms="tmux select-pane -t" alias tmk="killall tmux; tmux" -alias emacs="/usr/local/Cellar/emacs/24.5/Emacs.app/Contents/MacOS/Emacs -nw" PROMPT="%{$fg[green]%}<%{$fg[red]%}%n%{$reset_color%}@%{$fg[green]%}%m%{$fg[green]%}>%{$reset_color%} " expand-or-complete-with-dots(){ @@ -413,3 +412,5 @@ function zeptosay () { } fortune | cowsay + +~/.zshrc.priv