From 85d5c47d747b05668df688bc44ac827864740db3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 4 Jun 2018 18:17:32 +1200 Subject: 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. --- vim/after/ftplugin/html/lint.vim | 6 +++++- vim/after/ftplugin/html/tidy.vim | 6 +++++- vim/after/ftplugin/html/url_link.vim | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'vim') 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 -- cgit v1.2.3