preservim / vimux

easily interact with tmux from vim
MIT License
2.21k stars 161 forks source link

VimuxInterruptRunner using wrong sendkeys #159

Open kimperator opened 6 years ago

kimperator commented 6 years ago

Hello I got some problem with the VimuxInterruptRunner

First of all my Use-Case:

execute VimuxRunCommand to execute "build.sh" to build and run server component. Since it's a server component ant blocking this shell is now executing this program.

For recompiling I want to interrupt the running server (sending Ctrl+c to the pane) and restarting the last server so I use a key-mapping for killing the current build using VimuxInterruptRunner and VimuxRunLastCommand

Problem:

This is currently not working, because VimuxInterruptRunner is sending the key "^c" instead of "C-c".

Questions for implementing a solution

Is this key valid in other terminals, or is this simple a bug? on the one side we could simply edit change the sended keys, otherwise we have to make it variable.

Which one would you prefer?

Used toolset: Archlinuxarm for raspberry pi 2 Vim 8.0 tmux 2.6

Workarround

Calling Vimux SendKeys directly

nnoremap <C-e> :call VimuxOpenRunner()<CR>:sleep 10m<CR>:call VimuxSendKeys("C-c")<CR>:sleep 20m<CR>:VimuxPromptCommand<CR>
nnoremap <C-l> :call VimuxSendKeys("C-c")<CR>:sleep 50m<CR>:VimuxRunLastCommand<CR>   
alfunx commented 6 years ago

:VimuxInterruptRunner does work for me.

On: Vim 8.0.1176 tmux 2.6 Zsh 5.4.2 as well as on bash 4.4.12(1) termite v12 Arch Linux 4.13.6-1

alerque commented 3 years ago

Is this still a confirmed issue? If so is there any way we could work up a minimal test case with some dummy shell command so we can figure out who it does and doesn't work for with as little setup as possible?