Closed kljohann closed 10 years ago
I just had the same use case where I would like to quickly create a mapping to execute the following:
map <leader>t :call tbone#send_keys('right', 'make test')
I know that vim-dispatch has a similar goal, but I like how this approach lets me specify the target pane.
@tpope Do you see any reason not to merge this pull request?
I don't think that echoerr
business belongs in an API for starters. Use an exception.
But really I've been silent because I'm hesitant in general to support APIs, and I didn't want to create busywork for anyone before I had time to think on it. It's probably fine.
I can understand that you might not want to go in this direction.
If anybody runs into the same issue I can recommend slimux. If only it would support relavite panes like left
and right
.
@tpope Feel free to remove the previous paragraph if you don't want links to competing plugins here.
Actually I was surprised to receive this in light of every other tmux plugin I looked at being a high ceremony send-keys wrapper. But as you've touched on, high ceremony can be pretty restrictive.
Fix the echoerr
issue, move the length echoing out of the function, and I think this is good to go.
Implemented in #7.
Hi, I split off the meat of the
tbone#write_command
into a separate function that can be used from other plugins to send keys to a tmux pane. I'm using this for interacting with a REPL where only using ':Twrite' does not cut it as I want to send custom strings that do not correspond to lines in the buffer.