I have the following code in my
if exists(":Goyo") augroup LatexGoyo autocmd! autocmd BufReadPost,BufNewFile *.tex Goyo augroup END else augroup LatexColumnSet autocmd FileType tex setlocal columns=100 augroup END endif
The idea is to check for the presence of the
Goyo command provided by the
goyo.vim plugin, and then invoke it upon opening any
tex file. If this plugin is not available/installed, then I'd like to set the columns to 100.
However, with these settings in my
vimrc, when opening a
tex file, the
Goyo command is not executed.
What am I doing wrong, and how to fix this?