From 5a10e942c83040230101572c4f6a2888a2af66f1 Mon Sep 17 00:00:00 2001 From: Kevin Yap Date: Fri, 4 Nov 2016 11:33:24 -0700 Subject: [PATCH 1/4] Only load liquidprompt in interactive shells --- source/misc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/misc.sh b/source/misc.sh index 46fa7da..4ed01dd 100644 --- a/source/misc.sh +++ b/source/misc.sh @@ -38,7 +38,7 @@ command -v brew >/dev/null 2>&1 && [ -f $(brew --prefix)/etc/bash_completion ] & command -v brew >/dev/null 2>&1 && [ -f $(brew --prefix)/etc/profile.d/z.sh ] && source $(brew --prefix)/etc/profile.d/z.sh # Source liquidprompt from vendor directory -source $HOME/.dotfiles/vendor/liquidprompt/liquidprompt +[[ $- = *i* ]] && source $HOME/.dotfiles/vendor/liquidprompt/liquidprompt # Return true so first prompt uses 0 as last exit code true -- 2.51.2 From 0d4f3a773bccfd24e5fb60d546584ab9e1e952d5 Mon Sep 17 00:00:00 2001 From: Kevin Yap Date: Fri, 4 Nov 2016 11:56:26 -0700 Subject: [PATCH 2/4] Update .tmux.conf --- link/.tmux.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/link/.tmux.conf b/link/.tmux.conf index 0a4cfab..a3365a8 100644 --- a/link/.tmux.conf +++ b/link/.tmux.conf @@ -7,6 +7,9 @@ set -g status-interval 5 set -sg escape-time 1 setw -g mode-keys vi +# Fix pasteboard commands on macOS +if-shell 'test "$(uname)" = "Darwin"' 'set-option -g default-command "reattach-to-user-namespace -l bash"' + # Don't rename windows automatically set-option -g allow-rename off @@ -18,6 +21,9 @@ unbind C-b set-option -g prefix C-a bind-key C-a send-prefix +# Opne new windows and tabs in the same directory +bind c new-window -c "#{pane_current_path}" + # Bindings for splitting panes unbind '"' unbind % -- 2.51.2 From cf8c226d2a19f1d554827a4c00a595186e91cf8d Mon Sep 17 00:00:00 2001 From: Kevin Yap Date: Sat, 5 Nov 2016 01:04:03 -0700 Subject: [PATCH 3/4] Select text with mouse to copy in tmux --- link/.tmux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/link/.tmux.conf b/link/.tmux.conf index a3365a8..7fb52ec 100644 --- a/link/.tmux.conf +++ b/link/.tmux.conf @@ -38,6 +38,7 @@ bind-key -t vi-copy v begin-selection bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" unbind -t vi-copy Enter bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" +bind-key -t vi-copy MouseDragEnd1Pane copy-pipe "reattach-to-user-namespace pbcopy" # Reload ~/.tmux.conf using `C-a r` bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf" -- 2.51.2 From d70c8ef6116c394af07babb7a8509c47493920e9 Mon Sep 17 00:00:00 2001 From: Kevin Yap Date: Sat, 5 Nov 2016 15:16:52 -0700 Subject: [PATCH 4/4] Add mapping for new horizontal Vim split --- link/.vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/link/.vimrc b/link/.vimrc index cfaa8fd..51d4272 100644 --- a/link/.vimrc +++ b/link/.vimrc @@ -89,8 +89,9 @@ let mapleader = "," " Remap leader key to comma " Clear current search nnoremap :noh -" Open a new vertical split and switch to it +" Open a new vertical/horizontal split and switch to it nnoremap n vl +nnoremap h nl " Close the current buffer nnoremap w :bd -- 2.51.2