aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-30 11:37:47 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-30 11:37:47 +1300
commit79101439124340815c5cfa2c5165b362008b662a (patch)
treeceded8be3798d6f8f8be90514fc5567c4fcc7cdd /vim
parentMove vim/after/ftdetect to vim/ftdetect (diff)
downloaddotfiles-79101439124340815c5cfa2c5165b362008b662a.tar.gz
dotfiles-79101439124340815c5cfa2c5165b362008b662a.zip
Move PHP indent nixing into ~/.vim/indent
This method short-circuits the unwanted PHP expression-based indenting configuration completely, rather than running it all and then undoing it after the fact. This involves creating a new direction ~/.vim/indent, and a Makefile target install-vim-indent to copy everything into it.
Diffstat (limited to 'vim')
-rw-r--r--vim/after/indent/php.vim4
-rw-r--r--vim/indent/php.vim4
2 files changed, 4 insertions, 4 deletions
diff --git a/vim/after/indent/php.vim b/vim/after/indent/php.vim
deleted file mode 100644
index b4147c32..00000000
--- a/vim/after/indent/php.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" The PHP syntax file's expression-based indenting behaviour annoys me more
-" often than it helps me; turn it off and just use autoindent
-setlocal autoindent
-setlocal indentexpr=
diff --git a/vim/indent/php.vim b/vim/indent/php.vim
new file mode 100644
index 00000000..d0fb1f8f
--- /dev/null
+++ b/vim/indent/php.vim
@@ -0,0 +1,4 @@
+" 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.
+let b:did_indent = 1