aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-29 23:26:52 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-29 23:26:52 +1300
commitdc59d7e74635f9a56fef9049e34411d6ef535650 (patch)
tree41063a96c38500ede7ba3f5dd31b83e9000d46ea
parent61ad1432240290f889ef11a4b527163cc8fff83d (diff)
downloaddotfiles-dc59d7e74635f9a56fef9049e34411d6ef535650.tar.gz
Remove boilerplate after/ftplugin load guards
I'm likely going to move away from Vim 6.0 support, at least for all of this filetype stuff. We will keep the one filetype load guard we actually need, which is the HTML one, to stop plugins like markdown.vim from loading it.
-rw-r--r--vim/after/ftplugin/diff.vim5
-rw-r--r--vim/after/ftplugin/gitcommit.vim5
-rw-r--r--vim/after/ftplugin/help.vim5
-rw-r--r--vim/after/ftplugin/html.vim4
-rw-r--r--vim/after/ftplugin/mail.vim5
-rw-r--r--vim/after/ftplugin/make.vim5
-rw-r--r--vim/after/ftplugin/markdown.vim5
-rw-r--r--vim/after/ftplugin/perl.vim5
-rw-r--r--vim/after/ftplugin/php.vim5
-rw-r--r--vim/after/ftplugin/sh.vim5
-rw-r--r--vim/after/ftplugin/text.vim5
-rw-r--r--vim/after/ftplugin/vim.vim5
-rw-r--r--vim/after/ftplugin/zsh.vim5
13 files changed, 2 insertions, 62 deletions
diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim
index a52b3fdd..15682e7b 100644
--- a/vim/after/ftplugin/diff.vim
+++ b/vim/after/ftplugin/diff.vim
@@ -1,8 +1,3 @@
-" Extra configuration for diffs
-if &filetype !=# 'diff' || v:version < 700 || &compatible
- finish
-endif
-
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_diff_maps')
finish
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 18bacfb8..762df0ba 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -1,8 +1,3 @@
-" Extra configuration for Git commit messages
-if &filetype !=# 'gitcommit' || v:version < 700
- finish
-endif
-
" Make angle brackets behave like mail quotes
setlocal comments+=n:>
setlocal formatoptions+=coqr
diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim
index 71ad3a8d..ae032344 100644
--- a/vim/after/ftplugin/help.vim
+++ b/vim/after/ftplugin/help.vim
@@ -1,8 +1,3 @@
-" Extra configuration for Vim help files
-if &filetype !=# 'help' || v:version < 700
- finish
-endif
-
" This variable had the wrong name before Vim 7.1
if v:version == 700 && exists('b:undo_plugin')
let b:undo_ftplugin = b:undo_plugin
diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim
index 29128c03..b5c387fb 100644
--- a/vim/after/ftplugin/html.vim
+++ b/vim/after/ftplugin/html.vim
@@ -1,5 +1,5 @@
-" Extra configuration for HTML files
-if &filetype !=# 'html' || v:version < 700 || &compatible
+" Don't load if the buffer is not actually HTML (e.g. Markdown)
+if &filetype !=# 'html'
finish
endif
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index d93b230e..e8b64164 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -1,8 +1,3 @@
-" Extra configuration for mail messages
-if &filetype !=# 'mail' || &compatible || v:version < 700
- finish
-endif
-
" If something hasn't already moved the cursor, we'll move to an optimal point
" to start writing
if line('.') == 1 && col('.') == 1
diff --git a/vim/after/ftplugin/make.vim b/vim/after/ftplugin/make.vim
index 3018e11b..353a0bbf 100644
--- a/vim/after/ftplugin/make.vim
+++ b/vim/after/ftplugin/make.vim
@@ -1,8 +1,3 @@
-" Extra configuration for Makefiles
-if &filetype !=# 'make' || v:version < 700
- finish
-endif
-
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_make_maps')
finish
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
index cd8873b9..1a5a055b 100644
--- a/vim/after/ftplugin/markdown.vim
+++ b/vim/after/ftplugin/markdown.vim
@@ -1,8 +1,3 @@
-" Extra configuration for Markdown documents
-if &filetype !=# 'markdown' || v:version < 700
- finish
-endif
-
" Spellchecking features
if has('spell')
diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim
index ee8da2a7..5dd2b7bb 100644
--- a/vim/after/ftplugin/perl.vim
+++ b/vim/after/ftplugin/perl.vim
@@ -1,8 +1,3 @@
-" Extra configuration for Perl filetypes
-if &filetype !=# 'perl' || v:version < 700 || &compatible
- finish
-endif
-
" Use Perl itself for checking and Perl::Tidy for tidying
compiler perl
setlocal equalprg=perltidy
diff --git a/vim/after/ftplugin/php.vim b/vim/after/ftplugin/php.vim
index 9b7c2bb0..172256db 100644
--- a/vim/after/ftplugin/php.vim
+++ b/vim/after/ftplugin/php.vim
@@ -1,8 +1,3 @@
-" Extra configuration for PHP scripts
-if &filetype !=# 'php' || v:version < 700 || &compatible
- finish
-endif
-
" Use PHP itself for syntax checking
compiler php
let b:undo_ftplugin .= '|unlet b:current_compiler'
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim
index 431e5037..6ee016a5 100644
--- a/vim/after/ftplugin/sh.vim
+++ b/vim/after/ftplugin/sh.vim
@@ -1,8 +1,3 @@
-" Extra configuration for shell script
-if &filetype !=# 'sh' || v:version < 700 || &compatible
- finish
-endif
-
" Set comment formats
setlocal comments=:#
setlocal formatoptions+=or
diff --git a/vim/after/ftplugin/text.vim b/vim/after/ftplugin/text.vim
index 8341f72d..cda2891c 100644
--- a/vim/after/ftplugin/text.vim
+++ b/vim/after/ftplugin/text.vim
@@ -1,8 +1,3 @@
-" Extra configuration for text files
-if &filetype !=# 'text' || v:version < 700
- finish
-endif
-
" Spellcheck documents we're actually editing (not just viewing)
if has('spell') && &modifiable && !&readonly
setlocal spell
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index 2fc5bd78..9f6245a5 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -1,8 +1,3 @@
-" Extra configuration for Vim scripts
-if &filetype !=# 'vim' || v:version < 700 || &compatible
- finish
-endif
-
" Use Vint as a syntax checker
if bufname('%') !=# 'command-line'
compiler vint
diff --git a/vim/after/ftplugin/zsh.vim b/vim/after/ftplugin/zsh.vim
index 49736401..5aa2600a 100644
--- a/vim/after/ftplugin/zsh.vim
+++ b/vim/after/ftplugin/zsh.vim
@@ -1,8 +1,3 @@
-" Extra configuration for Z shell scripts
-if &filetype !=# 'zsh' || v:version < 700 || &compatible
- finish
-endif
-
" Use Z shell itself as a syntax checker
compiler zsh
let b:undo_ftplugin .= '|unlet b:current_compiler'