aboutsummaryrefslogtreecommitdiff
path: root/vim/indent/php.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-02-01 18:03:50 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-02-01 18:03:50 +1300
commit2b45266b0a96188d21f3ba892ac635a44e552f6e (patch)
tree781765c418991854f0c6961033b1fef9b4adc1b9 /vim/indent/php.vim
parentMerge branch 'hotfix/v0.26.3' (diff)
parentBump version to 0.27.0 (diff)
downloaddotfiles-2b45266b0a96188d21f3ba892ac635a44e552f6e.tar.gz
dotfiles-2b45266b0a96188d21f3ba892ac635a44e552f6e.zip
Merge branch 'release/v0.27.0'v0.27.0
* release/v0.27.0: Bump version to 0.27.0 Replace ftplugin/php.vim with custom version Adjust explanation of PHP indent skip Remove help ftdetect rules
Diffstat (limited to 'vim/indent/php.vim')
-rw-r--r--vim/indent/php.vim12
1 files changed, 9 insertions, 3 deletions
diff --git a/vim/indent/php.vim b/vim/indent/php.vim
index d0fb1f8f..6a61f105 100644
--- a/vim/indent/php.vim
+++ b/vim/indent/php.vim
@@ -1,4 +1,10 @@
-" Lie to the php.vim indent file and tell it that it's already loaded itself,
-" to stop it processing its ridiculous expression-based indenting that never
-" seems to do what I want. Just plain autoindent is fine.
+" Replace Vim's stock PHP indent rules. They're very complicated and don't
+" work in a predictable way.
+if exists('b:did_indent')
+ finish
+endif
let b:did_indent = 1
+
+" Easier just to use 'autoindent'; not perfect, but predictable.
+setlocal autoindent
+let b:undo_indent = 'setlocal autoindent<'