mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-14 14:23:50 -05:00
Fix tmux invocation conditions in README
There are two cases where the current documentation would cause issues: 1. `tmux` isn't available in `$PATH`. 2. The current terminal isn' actually running `tmux`.
This commit is contained in:
committed by
Junegunn Choi
parent
1897929092
commit
012290431a
@@ -77,8 +77,10 @@ to be triggered on `GoyoEnter` and `GoyoLeave` events.
|
|||||||
|
|
||||||
```vim
|
```vim
|
||||||
function! s:goyo_enter()
|
function! s:goyo_enter()
|
||||||
|
if executable('tmux') && strlen($TMUX)
|
||||||
silent !tmux set status off
|
silent !tmux set status off
|
||||||
silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
|
silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
|
||||||
|
endif
|
||||||
set noshowmode
|
set noshowmode
|
||||||
set noshowcmd
|
set noshowcmd
|
||||||
set scrolloff=999
|
set scrolloff=999
|
||||||
@@ -87,8 +89,10 @@ function! s:goyo_enter()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:goyo_leave()
|
function! s:goyo_leave()
|
||||||
|
if executable('tmux') && strlen($TMUX)
|
||||||
silent !tmux set status on
|
silent !tmux set status on
|
||||||
silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
|
silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
|
||||||
|
endif
|
||||||
set showmode
|
set showmode
|
||||||
set showcmd
|
set showcmd
|
||||||
set scrolloff=5
|
set scrolloff=5
|
||||||
|
|||||||
Reference in New Issue
Block a user