junegunn / goyo.vim

:tulip: Distraction-free writing in Vim
MIT License
4.49k stars 115 forks source link

Is there a g:goyo_offset? Or any other way to set offsets permanently? #252

Closed michael-odonovan closed 3 years ago

michael-odonovan commented 3 years ago

Want to do what this does: :Goyo 50%+25%x50%-25% but put it in my config. Any ideas? thanks

michael-odonovan commented 3 years ago

Sorry for asking, got this to work, posting here for anyone else. Maybe would be great if there was g:goyo_offset=+15% as well if possible.

autocmd! User GoyoEnter nested call goyo_enter() function! s:goyo_enter() " width+offsetxheight Goyo 60%+15%x100% endfunction

autocmd! User GoyoEnter nested call goyo_enter()

junegunn commented 3 years ago

You can just write shortcut commands like so

command! MyGoyo Goyo 50%+25%x50%-25%
michael-odonovan commented 3 years ago

thanks your a diamond!