Open tbrooke opened 9 years ago
Hi @tbrooke, sorry for the inconvenience. The command to use is :VtrSendLinesToRunner
which works on the current line in normal mode, or a visually selected group of lines. I refactored this a bit ago but neglected to updates the docs. Sorry! I wanted to reply now in hopes of fixing the immediate issue for you, but I'm going to keep this open until I fix up the documentation.
Also, docs mention VtrSendLineToRunner
but it doesn't exist.
so is there a way to run the visually selected region, if it's not the entire line? i.e. visual mode instead of visual line mode?
@WuTheFWasThat there currently is not, although I think that would be a great enhancement. I built this functionality before I had started working with custom operators, but I think I could take a stab at this now. I've created https://github.com/christoomey/vim-tmux-runner/issues/61 to capture the work needed to implement this. Not sure how soon I'll get to it, but this is a great idea. Thanks!
no problem! this is totally off topic, but some other ideas i had:
the plugin seems to be good for my workflow, by the way. i totally understand that it takes time to maintain and you don't currently have it :P, maybe me or somebody else can take a crack one day ..
Hey @WuTheFWasThat, ideas are great!
1) There is actually a command for this, unfortunately undocumented (whoops). VtrSendCommandToRunner!
(key being the !
at the end) will open a pane if needed, otherwise run against the attached pane.
2) We don't have built in support for the exact use case of opening a specific REPL, but VtrOpenRunner
can take a few options (document here, which makes me feel a little better). With that, you can have filetype specific by setting a filetype specific mapping, with initial command (repl) in an ftplugin file:
" in ~/.vim/ftplugin/ruby
nmap <leader>opr :VtrOpenRunner { 'orientation': 'h', 'percentage': 50, 'cmd': 'pry' }<cr>
All that said, I'd welcome any help with doumentation, bugfixes, or feature work. PRs warmly welcomed :)
(feel free to open new issues for further discussions btw, so as not to complicate this one).
I get E492 not an editor message with VtrSendSelectedToRunner I looked in the code and didn't see it defined