christoomey / vim-tmux-runner

Vim and tmux, sittin' in a tree...
MIT License
291 stars 37 forks source link

VtrSendSelectedToRunner - E481: No range allowed #25

Closed arnm closed 9 years ago

arnm commented 9 years ago

I can run VtrSendLineToRunner just fine but when I select the text and try to send it over with VtrSendSelectedToRunner I get E481: No range allowed in vim.

christoomey commented 9 years ago

Hello @arnm, sorry for the issue. I have not documented the mappings as well as I should have. Turns out you need to add an escape to the visual mode map to clear the range. From my vimrc:

nmap <C-f> :VtrSendLineToRunner<cr>
vmap <C-f> <Esc>:VtrSendSelectedToRunner<cr>

This makes Ctrlf work for a single line in normal mode, or a group of visually selected lines in visual mode.

Will add this to the docs / mappings soon, but for now this should hopefully fix things for you.

arnm commented 9 years ago

Yeap, that works as expected. Thanks

christoomey commented 9 years ago

Closing this now as workaround is ok for now, and #15 captures the work needed to add the desired behavior.