aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-16 20:41:46 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-16 20:41:46 +1200
commite084c69ff30472856a3a91ece6d8bc6ec99238a6 (patch)
tree5473d3c18127eaf2cb8ea1d1410ba92e693f6ef9
parent948ece4750598f649b2bb7fe3961cf5acb763df7 (diff)
downloaddotfiles-e084c69ff30472856a3a91ece6d8bc6ec99238a6.tar.gz
Consistently require 'nocompatible' for ftplugins
-rw-r--r--vim/ftplugin/markdown.vim14
-rw-r--r--vim/ftplugin/php.vim14
2 files changed, 2 insertions, 26 deletions
diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim
index 94f49c9b..c6a180a9 100644
--- a/vim/ftplugin/markdown.vim
+++ b/vim/ftplugin/markdown.vim
@@ -6,17 +6,11 @@
" without providing a variable check to stop it. That causes absurd problems
" with defining HTML checkers/linters in the rest of my files.
"
-if exists('b:did_ftplugin')
+if exists('b:did_ftplugin') || &compatible
finish
endif
let b:did_ftplugin = 1
-" Support line continuation for this file
-if &compatible
- let s:cpoptions_save = &cpoptions
- set cpoptions-=C
-endif
-
" Set comment/quote patterns
setlocal comments=fb:*,fb:-,fb:+,n:>
setlocal commentstring=>\ %s
@@ -37,9 +31,3 @@ let b:undo_ftplugin = 'setlocal comments<'
\ . '|setlocal commentstring<'
\ . '|setlocal formatoptions<'
\ . '|setlocal formatlistpat<'
-
-" Restore 'cpoptions' setting if we touched it
-if exists('s:cpoptions_save')
- let &cpoptions = s:cpoptions_save
- unlet s:cpoptions_save
-endif
diff --git a/vim/ftplugin/php.vim b/vim/ftplugin/php.vim
index 39cec4b1..35292e15 100644
--- a/vim/ftplugin/php.vim
+++ b/vim/ftplugin/php.vim
@@ -6,17 +6,11 @@
" without providing a variable check to stop it. That causes absurd problems
" with defining HTML checkers/linters in the rest of my files.
"
-if exists('b:did_ftplugin')
+if exists('b:did_ftplugin') || &compatible
finish
endif
let b:did_ftplugin = 1
-" Support line continuation for this file
-if &compatible
- let s:cpoptions_save = &cpoptions
- set cpoptions-=C
-endif
-
" Define keywords for matchit.vim
if exists('g:loaded_matchit')
let b:match_words = '<?php:?>'
@@ -30,9 +24,3 @@ endif
" Define how to undo this plugin's settings
let b:undo_ftplugin = 'unlet b:match_words'
-
-" Restore 'cpoptions' setting if we touched it
-if exists('s:cpoptions_save')
- let &cpoptions = s:cpoptions_save
- unlet s:cpoptions_save
-endif