aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-20 15:18:00 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-20 15:18:00 +1200
commitf07fc478c1a97a11b7fe79a7e7d7236803a0fb95 (patch)
treee4d6b60c64a32b8d6d7c86f1f850970fcd86cdb3 /vim
parent902c5a025a2e413f1545a3250148078e97842ad7 (diff)
downloaddotfiles-f07fc478c1a97a11b7fe79a7e7d7236803a0fb95.tar.gz
dotfiles-f07fc478c1a97a11b7fe79a7e7d7236803a0fb95.zip
Prevent double-sourcing php.vim filetype plugin
Diffstat (limited to 'vim')
-rw-r--r--vim/after/ftplugin/html.vim11
1 files changed, 8 insertions, 3 deletions
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