@@ -45,20 +45,16 @@ if use_prettier
4545 endif
4646 enddef
4747
48- if &filetype == " markdown"
49- PrettierInstalledCheck ()
50- else
51- augroup MARKDOWN_EXTRAS_PRETTIER_CHECK
52- autocmd !
53- # TODO : Changing BufReadPre with FileType markdown won't work because
54- # FileType markdown autocmd is executed after ftplugin/markdown.vim is sourced,
55- # and therefore ftplugin/markdown.vim would see use_prettier = true all
56- # the time. Hence, the hack is to use BufReadPre and to specify all the
57- # possible file extensions.
58- autocmd BufReadPre *.md,*.markdown,*.mdown,*.mkd ++once
59- \ PrettierInstalledCheck ()
60- augroup END
61- endif
48+ augroup MARKDOWN_EXTRAS_PRETTIER_CHECK
49+ autocmd !
50+ # TODO : Changing BufReadPre with FileType markdown won't work because
51+ # FileType markdown autocmd is executed after ftplugin/markdown.vim is sourced,
52+ # and therefore ftplugin/markdown.vim would see use_prettier = true all
53+ # the time. Hence, the hack is to use BufReadPre and to specify all the
54+ # possible file extensions.
55+ autocmd BufReadPre *.md,*.markdown,*.mdown,*.mkd ++once
56+ \ PrettierInstalledCheck ()
57+ augroup END
6258endif
6359
6460# Check if pandoc can/shall be used or not
@@ -77,13 +73,9 @@ if use_pandoc
7773 endif
7874 enddef
7975
80- if &filetype == " markdown"
81- PandocInstalledCheck ()
82- else
83- augroup MARKDOWN_EXTRAS_PANDOC_CHECK
84- autocmd !
85- autocmd BufReadPre *.md,*.markdown,*.mdown,*.mkd ++once
86- \ PandocInstalledCheck ()
87- augroup END
88- endif
76+ augroup MARKDOWN_EXTRAS_PANDOC_CHECK
77+ autocmd !
78+ autocmd BufReadPre *.md,*.markdown,*.mdown,*.mkd ++once
79+ \ PandocInstalledCheck ()
80+ augroup END
8981endif
0 commit comments