junegunn / junegunn/goyo.vim

Feature request: Option to prevent exiting goyo mode on quit/bd etc

Open
#151 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
4.7k
Forks
118
PR merge metrics
No merged PRs in 30d

Description

I like to stay in goyo until close all buffers or manually call `Goyo()` to change modes.

I was hoping to be able to prevent goyo from intercepting `:q` and `:bd` and calling `goyo_exit()`, but I couldn't figure out how to do this.

The best I could do was to write a `s:goyo_leave()` function like this:

```
function! s:goyo_leave()
call goyo#execute(0, g:goyo_width . "x" . g:goyo_height)
endfunction
```
Whoops, submitted to soon, continuing:

It re-enters goyo whenever it tries to exit. This is suboptimal, since once you enter goyo, you can't leave.

Would it be possible to provide a boolean setting which allows preventing the auto-off functionality?

Something like: `g:goyo_auto_off` which defaults to `true`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.