From a8ece931855b5d5bb474421381f693869d8752b2 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Wed, 1 Jun 2022 13:39:21 +0200 Subject: [PATCH] :sparkles: update tmux:vim-bindings + roadmap --- .tmux.conf | 39 ++++++++++++++++++++++++++++++++++++++- README.md | 7 ++++--- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index f2420e8..b9b4280 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,8 +1,45 @@ -# remap prefix from ^+A to ^+B +# colors +set -g default-terminal "tmux-256color" +set -ga terminal-overrides ",*256col*:Tc" + +# remap prefix from ^+A to ^+B (for nested tmux sessions) unbind C-b set -g prefix C-a bind C-a send-prefix +# enable mouse selection +# Note: may break OSX copy/paste +set -g mouse on + +# extend history +set -g history-limit 100000 # set vi keybindings setw -g mode-keys vi + +# reduce escape time +set-option -sg escape-time 20 + +# pane movement shortcuts +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# window selection +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ + +# Resize pane shortcuts +bind -r H resize-pane -L 10 +bind -r J resize-pane -D 10 +bind -r K resize-pane -U 10 +bind -r L resize-pane -R 10 + +# split with dash and vbar +bind | split-window -h -c "#{pane_current_path}" +bind - split-window -v -c "#{pane_current_path}" + +# server-tmux only: +# fix ssh agent when tmux is detached +# setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock diff --git a/README.md b/README.md index 3f872db..ce8d22f 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da * extend *makefile*: * **low-level configs:** config zsh, config nvim, config tmux-local, config tmux-remote * **machine level config:** config mac local machine, config ubuntu local machine, config ubuntu server -* configure **tmux**: +* [ ] configure **tmux**: * [X] remote nested sessions - * [ ] change tmux:pane-switching bindings from arrow keys to vim bindings -* music config: + * [X] change tmux:pane-switching bindings from arrow keys to vim bindings +* [ ] music config: * mpd, mpc, ncmpcpp ([Mac guide](https://killtheyak.com/install-mpd-mpc-ncmpcpp/), [config guide for mac](https://computingforgeeks.com/install-configure-mpd-ncmpcpp-macos/)) + * test on new machine with music dir