-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to enable goyo when start vim? #247
Comments
See |
If you want to run any command on start with vim, you can use an autocmd. In this case, you could put the following line in your .vimrc
which would run the command I highly recommend looking through a bit of the documentation, as it makes tinkering around with vim much easier in the long run~ |
Thank you. I needed markdown files to be open with Goyo. Super simple.
|
How to avoid typing ":q!" twice to exit? |
@leontepe I am having the same question. Did you found any solution? |
@leontepe @sicr0 when I can remember to do it i use |
Just in case anyone has not found a workaround yet: let s:goyostatus = 1
function! ToggleGoyo()
if s:goyostatus
let s:goyostatus = 0
else
let s:goyostatus = 1
endif
Goyo
endfunction
nnoremap <silent> <Leader><Leader> :call ToggleGoyo()<CR>
function! s:goyo_leave()
if s:goyostatus
quit!
endif
endfunction
autocmd! User GoyoLeave nested call <SID>goyo_leave() Not sure if there's a more elegant solution but this works as long as you toggle with function! s:goyo_leave()
quit!
endfunction
autocmd! User GoyoLeave nested call <SID>goyo_leave() |
nevermind there was a better solution all along |
thanks!
The text was updated successfully, but these errors were encountered: