aboutsummaryrefslogtreecommitdiff
path: root/vim/ftdetect/zsh.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/ftdetect/zsh.vim')
-rw-r--r--vim/ftdetect/zsh.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/vim/ftdetect/zsh.vim b/vim/ftdetect/zsh.vim
new file mode 100644
index 00000000..1bcde981
--- /dev/null
+++ b/vim/ftdetect/zsh.vim
@@ -0,0 +1,9 @@
+" Z shell files
+autocmd BufNewFile,BufRead
+ \ *.zsh,.zprofile,zprofile,.zshrc,zshrc
+ \ setfiletype zsh
+autocmd BufNewFile,BufRead
+ \ *
+ \ if getline(1) =~ '^#!.*zsh$'
+ \ | setfiletype zsh
+ \ | endif