From 8d4e1b3c6fadacf11fd0058bca4c155c7c1ca1d7 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 28 Apr 2017 21:43:23 -0500 Subject: [PATCH] To do! --- readme.md | 2 ++ shell/tmux.conf | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index 701f478..a80c718 100644 --- a/readme.md +++ b/readme.md @@ -81,3 +81,5 @@ Here are some bullet points on my workflow as a Web Developer: * Vimux * urxvt reizing * urxvt fontawesome +* Alacritty as terminal? +* Cloud IRC diff --git a/shell/tmux.conf b/shell/tmux.conf index 70ae5bf..0301fb6 100644 --- a/shell/tmux.conf +++ b/shell/tmux.conf @@ -67,14 +67,6 @@ set -g pane-base-index 1 # custom predefined layouts bind M-l source-file ~/.tmux/layouts/dev.tmux -# mimic pane switching in and out of vim -is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' -bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" -bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" -bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" -bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" -bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" - set -g pane-border-fg colour18 set -g pane-active-border-fg blue set -g pane-active-border-bg default @@ -84,6 +76,18 @@ bind-key u capture-pane \;\ save-buffer /tmp/tmux-buffer \;\ split-window -l 10 "urlview /tmp/tmux-buffer" +# mimic pane switching in and out of vim +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" +bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" + +bind-key -Tcopy-mode-vi 'C-h' send -X "cancel select-pane -L" +bind-key -Tcopy-mode-vi 'y' send -X copy-selection + # list of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' @@ -95,6 +99,7 @@ set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-copycat' set -g @plugin 'tmux-plugins/tmux-sessionist' +set -g @plugin 'christoomey/vim-tmux-navigator' # plugin options