preservim / vimux

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

inspect & zoom in one shot #151

Open mavam opened 7 years ago

mavam commented 7 years ago

I frequently find myself navigating through lengthy compiler output where I first zoom and then have to scroll through error messages. For this task, a combination of VimuxInspectRunner and VimuxZoomRunner would be handy (e.g., VimuxZoomInspectRunner).

Would you consider such a feature for a future release?

stellarhoof commented 7 years ago

The author hasn't had any activity in the last year

mavam commented 7 years ago

Thanks for the heads up. I hacked up my own version for now:

" Combine VimuxZoomRunner and VimuxInspectRunner in one function.
function! VimuxZoomInspectRunner()
  if exists("g:VimuxRunnerIndex")
    call _VimuxTmux("select-"._VimuxRunnerType()." -t ".g:VimuxRunnerIndex)
    call _VimuxTmux("resize-pane -Z -t ".g:VimuxRunnerIndex)
    call _VimuxTmux("copy-mode")
  endif
endfunction

(@benmills: Let me know if you want a PR when you're back.)

alerque commented 3 years ago

I'd be willing to consider this as a PR if it was also documented. I don't want to make the array of commands provided but this seems like a reasonable complement to the existing set. It might be worth considering whether either the zoom or inspect functions would be better refactored as optional arguments for other functions rather than having one for each plus combos.