From f07fc478c1a97a11b7fe79a7e7d7236803a0fb95 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 20 Jun 2019 15:18:00 +1200 Subject: Prevent double-sourcing php.vim filetype plugin --- vim/after/ftplugin/html.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'vim/after/ftplugin') diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim index d9c0149c..027fed1f 100644 --- a/vim/after/ftplugin/html.vim +++ b/vim/after/ftplugin/html.vim @@ -1,6 +1,11 @@ -" Spellcheck documents we're actually editing (not just viewing), as long as -" they're actually HTML buffers and not just dotting this in -if &modifiable && !&readonly && &filetype ==# 'html' +" None of this is appropriate for other filetypes that are just sourcing this +" filetype's scripts in, e.g. Markdown, PHP, so cut that off here +if &filetype !=# 'html' + finish +endif + +" Spellcheck documents we're actually editing (not just viewing) +if &modifiable && !&readonly setlocal spell let b:undo_ftplugin .= '|setlocal spell<' endif -- cgit v1.2.3