aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-10-30 15:41:26 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-10-30 15:41:26 +1300
commitffb28f286e794d10c82831a50531f12d568d0d1d (patch)
tree14d76f6a8c7b8ecfbf703de25b354bb60a43afb2
parentRefine 'isk' setting in sh.vim (diff)
downloaddotfiles-ffb28f286e794d10c82831a50531f12d568d0d1d.tar.gz
dotfiles-ffb28f286e794d10c82831a50531f12d568d0d1d.zip
Fix simpleDeRef in sh.vim
-rw-r--r--Makefile4
-rw-r--r--vim/after/syntax/sh.vim10
2 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c6360510..14f7a762 100644
--- a/Makefile
+++ b/Makefile
@@ -169,8 +169,10 @@ install-vim-plugins : install-vim-config
"$$file" "$(HOME)"/.vim/"$$file" ; \
done
install -m 0755 -d -- \
- "$(HOME)"/.vim/after/ftplugin
+ "$(HOME)"/.vim/after/ftplugin \
+ "$(HOME)"/.vim/after/syntax
install -m 0644 -- vim/after/ftplugin/* "$(HOME)"/.vim/after/ftplugin
+ install -m 0644 -- vim/after/syntax/* "$(HOME)"/.vim/after/syntax
install-vim-pathogen : install-vim-plugins
install -m 0755 -d -- "$(HOME)"/.vim/autoload
diff --git a/vim/after/syntax/sh.vim b/vim/after/syntax/sh.vim
new file mode 100644
index 00000000..562ea9bc
--- /dev/null
+++ b/vim/after/syntax/sh.vim
@@ -0,0 +1,10 @@
+" shDerefSimple in sh.vim is not quite right, so let's fix it up
+syntax clear shDerefSimple
+
+" $var, $VAR, $var_new, $_var, $var1 ...
+syntax match shDerefSimple '\$\h[a-zA-Z0-9_]*'
+" $0, $1, $2 ...
+syntax match shDerefSimple '\$\d'
+" $-, $#, $* ...
+syntax match shDerefSimple '\$[-#*@!?$]'
+