I want to send commands to tmux to run Elixir tests from vim. Using the
% variable allows me to run the command to run a test for a single file. The relevant line in my
nmap <silent> <leader>ef :! tmux send -t 0.1 'mix test %:p' Enter<CR><c-L>
This sends, for example,
mix test /path/to/spec.exs when I'm in a spec. That works for testing a single file.
Now I want to be able to run a single test. The command would have the format
mix test /path/to/test.exs:<lineno>, so the path, a colon, and the line number. I tried things like
line(.), but I can't figure out how to interpolate that inside of a
tmux send string.