0
votes

I have a tmux session called test with several windows, one for each test file. I have another tmux session with vim and the tmuxify plugin. When I tap <f8>, my .vimrc file is programmed to send the <f7> key to the the left pane in window #0 like so:

nmap <buffer> <F8> :execute "silent !tmux send-keys -t test:0.left 'F7'" <bar>:redraw!<CR>

<f7> triggers the test to be run. Works well.

However, notice the test:0.left bit. I have window #0 hardcoded in there. If I want to run the tests in window #7, for example, I first have to swap it with window #0 and then run the test.

What I'd rather do is just send the <f7> key to whatever window in the test session is currently open.

Is there a way to do this?

1

1 Answers

0
votes

I consulted ye olde manual. Solution:

test:.left

Leaving the window blank defaults to the current window.