" Autoload functions for Goyo plugin. " Last Changed: 2021-02-15 " Author: Federico Igne <> " License: This file is placed in the public domain. function! dyamon#goyo#enter() abort " Tmux zoom on Goyo toggle. " `#` needs to be escaped to avoid expansion into alternate file. "silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z " Hide all statusline features setlocal noruler noshowcmd laststatus=0 " Change the line number column color highlight LineNr ctermbg=0 " Disable `colorcolumn` when in Goyo. let b:guides = 1 " Simulate re-focus on Goyo windows (a focus event is not triggered " on Goyo enter apparently) call dyamon#guides#off() call dyamon#guides#on() " Goyo is enabled. This is also used to limit the statusbar updates " during focus/unfocus events. let b:disable_statusline = 1 endfunction function! dyamon#goyo#leave() abort " Goyo is disabled unlet b:disable_statusline " Re-enable guides unlet b:guides " Untoggle Tmux Zoom if necessary " `#` needs to be escaped to avoid expansion into alternate file. "silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z " Reset statusline setlocal ruler showcmd laststatus=2 " Reset line number column color highlight LineNr ctermbg=18 " Reset statusline (focused) call dyamon#statusline#focus() endfunction