mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-16 07:13:50 -05:00
f889b4357ea9ce9c4e0e4ead8d89263d784b6ff1
goyo.vim (고요)
Distraction-free writing in Vim.
Installation
Use your favorite plugin manager.
- vim-plug
- Add
Plug 'junegunn/goyo.vim'to .vimrc - Run
:PlugInstall
- Add
Usage
:Goyo [width]
Configuration
g:goyo_width(default: 80)g:goyo_margin_top(default: 4)g:goyo_margin_bottom(default: 4)g:goyo_linenr(default: 0)g:goyo_callbacks([before_funcref, after_funcref])
Callbacks
By default, vim-airline, vim-powerline, powerline, and vim-gitgutter are temporarily disabled while in Goyo mode.
If you have other plugins that you want to disable/enable, or if you want to change the default settings of Goyo window, you can define before and after callbacks as follows in your .vimrc.
function! s:goyo_before()
silent !tmux set status off
set noshowmode
set noshowcmd
" ...
endfunction
function! s:goyo_after()
silent !tmux set status on
set showmode
set showcmd
" ...
endfunction
let g:goyo_callbacks = [function('s:goyo_before'), function('s:goyo_after')]
More examples can be found here: Customization
Inspiration
License
MIT
Languages
Vim Script
100%
