darkcloud-vimconfig/vim/config/plugins/goyo.vim

9 lines
270 B
VimL
Raw Normal View History

autocmd VimEnter,Filetype *
\ let g:goyo_width = &textwidth |
\ if (g:goyo_width == 0) |
\ let g:goyo_width = max(map(getline(1,'$'), 'len(v:val)')) |
\ if (g:goyo_width < 80) |
\ let g:goyo_width = 80 |
\ endif |
\ endif