aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-04 18:17:32 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-04 18:17:32 +1200
commit85d5c47d747b05668df688bc44ac827864740db3 (patch)
tree713a4635ba1ea6a2efcb253df2bf2b640d124c30
parentd0fbc06579efafd175fce6a6a7b5460d55311d11 (diff)
downloaddotfiles-85d5c47d747b05668df688bc44ac827864740db3.tar.gz
Don't load my HTML ftplugins for Markdown types
The stock markdown.vim file loads in all the html.vim ftplugins too. This is probably a good idea for the stock files, but none of my HTML extension plugins are appropriate for Markdown, so exclude them.
-rw-r--r--vim/after/ftplugin/html/lint.vim6
-rw-r--r--vim/after/ftplugin/html/tidy.vim6
-rw-r--r--vim/after/ftplugin/html/url_link.vim6
3 files changed, 15 insertions, 3 deletions
diff --git a/vim/after/ftplugin/html/lint.vim b/vim/after/ftplugin/html/lint.vim
index c0fdc44f..21f2a72c 100644
--- a/vim/after/ftplugin/html/lint.vim
+++ b/vim/after/ftplugin/html/lint.vim
@@ -1,8 +1,12 @@
" Only do this when not done yet for this buffer
-" Also do nothing if 'compatible' enabled
+" Also do nothing if 'compatible' enabled, or if the current filetype is
+" actually markdown
if exists('b:did_ftplugin_html_lint') || &compatible
finish
endif
+if &filetype == 'markdown'
+ finish
+endif
let b:did_ftplugin_html_lint = 1
" Initialise undo variable if not already done
diff --git a/vim/after/ftplugin/html/tidy.vim b/vim/after/ftplugin/html/tidy.vim
index 519a7cd6..270e54e2 100644
--- a/vim/after/ftplugin/html/tidy.vim
+++ b/vim/after/ftplugin/html/tidy.vim
@@ -1,8 +1,12 @@
" Only do this when not done yet for this buffer
-" Also do nothing if 'compatible' enabled
+" Also do nothing if 'compatible' enabled, or if the current filetype is
+" actually markdown
if exists('b:did_ftplugin_html_tidy') || &compatible
finish
endif
+if &filetype == 'markdown'
+ finish
+endif
let b:did_ftplugin_html_tidy = 1
if exists('b:undo_ftplugin')
let b:undo_ftplugin = b:undo_ftplugin
diff --git a/vim/after/ftplugin/html/url_link.vim b/vim/after/ftplugin/html/url_link.vim
index 85e9d719..4102e768 100644
--- a/vim/after/ftplugin/html/url_link.vim
+++ b/vim/after/ftplugin/html/url_link.vim
@@ -1,8 +1,12 @@
" Only do this when not done yet for this buffer
-" Also do nothing if 'compatible' enabled
+" Also do nothing if 'compatible' enabled, or if the current filetype is
+" actually markdown
if exists('b:did_ftplugin_html_url_link') || &compatible
finish
endif
+if &filetype == 'markdown'
+ finish
+endif
let b:did_ftplugin_html_url_link = 1
if exists('b:undo_ftplugin')
let b:undo_ftplugin = b:undo_ftplugin