diff options
author | terminaldweller <thabogre@gmail.com> | 2021-07-10 22:56:23 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-07-10 22:56:23 +0000 |
commit | 4ed623d52ff73c70be739a476daa12f58ddf7e46 (patch) | |
tree | 0e11c7efa44dee99f5efaf0ebcac80087d3fec80 /.tmux.conf | |
parent | update (diff) | |
download | scripts-4ed623d52ff73c70be739a476daa12f58ddf7e46.tar.gz scripts-4ed623d52ff73c70be739a476daa12f58ddf7e46.zip |
switch between vim and tmux with c-w c-w. feels comfy. changed diasm into actual asm for c and c++ in the makefiles. some more things for vim.
Diffstat (limited to '')
-rw-r--r-- | .tmux.conf | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -65,6 +65,8 @@ bind -T off F6 \ wg_is_keys_off="#[fg=colour15,bg=colour63,bold]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[fg=colour22] #{?#{pane_ssh_connected},#[fg=colour63 bg=colour24],#[fg=colour63 bg=colour31]}#[default]" +# from christoomey's vim-tmux-nivagator +is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" #key bindings #do not use alt keybindings. because of the escape passed at the beginning of a alt keycode, #zsh's vim mode's escape becomes slow since tmux will have to wait on keybindings beginning with escape. @@ -74,6 +76,9 @@ bind -r k select-pane -U bind -r j select-pane -D bind -r h select-pane -L bind -r l select-pane -R +# bind -n C-w-w select-pane -l +bind-key -Ttable1 'C-w' if-shell "$is_vim" 'send-keys C-w' 'select-pane -l' +bind-key -Troot 'C-w' if-shell "$is_vim" 'send-keys C-w' 'switch-client -Ttable1' # bind -n S-Right next-window # bind -n S-Left previous-window bind -n C-k next-window @@ -82,10 +87,10 @@ bind -n C-j previous-window # bind -n M-Down select-pane -D # bind -n M-Left select-pane -L # bind -n M-Right select-pane -R -bind -r C-k select-pane -U -bind -r C-j select-pane -D -bind -r C-h select-pane -L -bind -r C-l select-pane -R +# bind -r C-k select-pane -U +# bind -r C-j select-pane -D +# bind -r C-h select-pane -L +# bind -r C-l select-pane -R setw -g mode-keys vi bind [ copy-mode bind -T copy-mode-vi 'v' send -X begin-selection |