diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-06-04 19:20:19 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-06-04 19:20:19 +0200 |
| commit | 9f669d69e3f2a74eac494e1327b4fbb1e48acca9 (patch) | |
| tree | 64d8f97a8d43c9f61a802adf398d0280f09e3805 /modules/programs | |
| parent | 0ef237453109604733050ebd3082a0dcdd3cfd91 (diff) | |
tmux: fix vim copy bindings for >= v2.4
Diffstat (limited to 'modules/programs')
| -rw-r--r-- | modules/programs/tmux.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index c392188..9b5898c 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -160,11 +160,12 @@ in { bind s split-window -v -c '#{pane_current_path}' bind v split-window -h -c '#{pane_current_path}' - bind -t vi-copy v begin-selection + bind-key -T copy-mode-vi p send-keys -X copy-pipe-and-cancel "tmux paste-buffer" + bind-key -T copy-mode-vi v send-keys -X begin-selection '' + optionalString stdenv.isLinux '' - bind -t vi-copy y copy-selection + bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel '' + optionalString stdenv.isDarwin '' - bind -t vi-copy y copy-pipe "${pkgs.reattach-to-user-namespace}/bin/reattach-to-user-namespace pbcopy" + bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${pkgs.reattach-to-user-namespace}/bin/reattach-to-user-namespace pbcopy" ''); }; |
