Vim: Execute Goyo plugin when opening Markdown file

Vim: Execute Goyo plugin when opening Markdown file

So far I've got this:

autocmd Filetype markdown call SetUpMk()
function SetUpMk()
    colorscheme pencil
    execute 'Goyo'
endfunction

But that doesn't work. No errors or nothing, it just does nothing. The function is allright, because the colorscheme is being set to pencil. Should be that hard, right? I basically just want vim to do :Goyo when I open a file. Any ideas?

答案1

You don't need to call a function, just add:

au FileType markdown colorscheme pencil | Goyo

相关内容