From 8b635ab835f6fa107db66d6b72dfd23815105253 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Sat, 3 Dec 2022 14:06:37 +0100 Subject: [PATCH] tmux: Better management for nvim --- .tmux.conf | 2 +- bin/tmux-edit-helper | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 4d7dc8e..297c1f2 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -29,7 +29,7 @@ bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D -bind -n M-1 select-window -t 1 +bind -n M-1 select-window -t nvim bind -n M-2 select-window -t 2 bind -n M-3 select-window -t 3 bind -n M-4 select-window -t 4 diff --git a/bin/tmux-edit-helper b/bin/tmux-edit-helper index e599dce..f9c06c0 100755 --- a/bin/tmux-edit-helper +++ b/bin/tmux-edit-helper @@ -11,4 +11,8 @@ else fre --store_name "$_store" --add "$_file" fi -nvim --server "$XDG_RUNTIME_DIR/nvim.sock" --remote "$_file" && tmux select-window -t1 +tmux new-window -S -n nvim \ + -e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \ + nvim --listen "$XDG_RUNTIME_DIR/nvim.sock" + +nvim --server "$XDG_RUNTIME_DIR/nvim.sock" --remote "$_file"