about summary refs log tree commit diff
path: root/dotfiles
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-03-23 12:55:34 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-03-23 12:55:34 +0100
commit1f920373ce2fecbda1fedf9ec8c8eb082233c1df (patch)
tree27d95b4908823855bdf889106097bd2a6f22dc4d /dotfiles
parentDotfiles: Nvim: Setup tmux integration (diff)
downloadnixos-config-1f920373ce2fecbda1fedf9ec8c8eb082233c1df.tar.gz
nixos-config-1f920373ce2fecbda1fedf9ec8c8eb082233c1df.tar.bz2
nixos-config-1f920373ce2fecbda1fedf9ec8c8eb082233c1df.zip
Dotfiles: Tmux: Set up resurrect to work with vim
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/tmux.conf5
1 files changed, 5 insertions, 0 deletions
diff --git a/dotfiles/tmux.conf b/dotfiles/tmux.conf
index 2367de6..7d6b702 100644
--- a/dotfiles/tmux.conf
+++ b/dotfiles/tmux.conf
@@ -43,6 +43,11 @@ bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
 bind '"' split-window -v -c "#{pane_current_path}"
 bind % split-window -h -c "#{pane_current_path}"
 
+resurrect_dir="$HOME/.tmux/resurrect"
+set -g @resurrect-dir $resurrect_dir
+set -g @resurrect-hook-post-save-all 'target=$(readlink -f $resurrect_dir/last); sed "s| --cmd .*-vim-pack-dir||g; s|/etc/profiles/per-user/$USER/bin/||g" $target | sponge $target'
+set -g @resurrect-capture-pane-contents 'on'
+set -g @resurrect-strategy-nvim 'session'
 set -g @catppuccin_flavour 'mocha'
 set -g @continuum-restore 'on'
 set -g @continuum-save-interval 4