From 050c8b555ae9f6fa2394d7c8a7b106fd81526050 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Tue, 12 Jan 2021 08:02:00 +0100 Subject: [PATCH] Fix tmux copy mode, manage Vim views automatically --- tmux.conf | 2 ++ vimrc | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/tmux.conf b/tmux.conf index 9b1d834..87a4dc7 100644 --- a/tmux.conf +++ b/tmux.conf @@ -54,4 +54,6 @@ bind -n S-Right next-window bind -n C-S-Left swap-window -t -1\; select-window -t -1 bind -n C-S-Right swap-window -t +1\; select-window -t +1 +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' + bind r source-file ~/.tmux.conf \; display "Reloading config..." diff --git a/vimrc b/vimrc index e84665b..7d2cda4 100644 --- a/vimrc +++ b/vimrc @@ -63,6 +63,10 @@ set thesaurus=$HOME/Documents/thesaurus/thesaurus_pkg/thesaurus.txt colorscheme flattened_dark set background=dark +" Automatically load/save views on files: +au BufWinLeave *.* mkview +au BufWinEnter *.* silent loadview + " Key mappings: nnoremap j gj nnoremap k gk