goyo.vim icon indicating copy to clipboard operation
goyo.vim copied to clipboard

Goyo enter and exit does not remove tmux

Open vmuthuk2 opened this issue 1 year ago • 5 comments

I was using below code to hide tmux while inside Goyo which was working until I recently updated neovim to v0.8.0. Is there a fix for this?

function! s:goyo_enter()
  if executable('tmux') && strlen($TMUX)
    silent !tmux set status off
    silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
  endif
  set noshowmode
  set noshowcmd
  set scrolloff=999
  Limelight
  " ...
endfunction

vmuthuk2 avatar Sep 05 '22 22:09 vmuthuk2

Did you setup autocmds as well?

junegunn avatar Sep 06 '22 02:09 junegunn

Yes, I use autocmd! User GoyoEnter nested call <SID>goyo_enter(). I have this issue on both Mac and Linux recently.

vmuthuk2 avatar Sep 06 '22 03:09 vmuthuk2

What about the other lines of code in the function? (set ..., Limelight) Are they executed as expected?

junegunn avatar Sep 07 '22 01:09 junegunn

Sorry tmux is hidden inside Goyo but the lualine and tab bar of neovim is not hidden. Refer to figure below: image

vmuthuk2 avatar Sep 11 '22 21:09 vmuthuk2

Goyo doesn't know what lualine is. I can't update Goyo whenever a new statusline plugin comes into being. You have to call its API for disabling/enabling it on GoyoEnter and GoyoLeave.

junegunn avatar Sep 14 '22 03:09 junegunn