diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-20 15:18:00 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-20 15:18:00 +1200 |
commit | f07fc478c1a97a11b7fe79a7e7d7236803a0fb95 (patch) | |
tree | e4d6b60c64a32b8d6d7c86f1f850970fcd86cdb3 | |
parent | Merge branch 'release/v6.36.0' into develop (diff) | |
download | dotfiles-f07fc478c1a97a11b7fe79a7e7d7236803a0fb95.tar.gz dotfiles-f07fc478c1a97a11b7fe79a7e7d7236803a0fb95.zip |
Prevent double-sourcing php.vim filetype plugin
-rw-r--r-- | vim/after/ftplugin/html.vim | 11 |
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 |