changeset 470:e4937efdf43e

Add some popup bindings for tmux
author Zeger Van de Vannet <zegervdv@me.com>
date Thu, 30 Sep 2021 17:36:18 +0200
parents c983b1061bab
children 375e2ea8452f
files dot_tmux.conf
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dot_tmux.conf	Wed Sep 29 11:47:31 2021 +0200
+++ b/dot_tmux.conf	Thu Sep 30 17:36:18 2021 +0200
@@ -133,3 +133,16 @@
 
 run-shell ~/.tmux/plugins/tmux-better-mouse-mode/scroll_copy_mode.tmux
 run-shell ~/.tmux/plugins/tmux-yank/yank.tmux
+
+set -g word-separators " "
+bind -n C-DoubleClick1Pane if -F '#{m/r:^[^:]*:[0-9]+:,#{mouse_word}}' {
+  run -C { popup -w90% -h90% -E -d '#{pane_current_path}' '
+      nvim `echo #{mouse_word}|awk -F: "{print \"+\"\\$2,\\$1}"`
+    ' }
+} {
+  run -C { popup -w90% -h90% -E -d '#{pane_current_path}' '
+      nvim "#{mouse_word}" || read -p "Press key to continue.. " -n1 -s
+    ' }
+}
+
+bind-key -n 'C-q' popup -w50% -h 90% -x 90% -E -d '#{pane_current_path}' chezmoi cd