xref: /vim-8.2.3635/runtime/ftplugin/zsh.vim (revision cb03397a)
1" Vim filetype plugin file
2" Language:		Zsh shell script
3" Maintainer:		Christian Brabandt <[email protected]>
4" Previous Maintainer:	Nikolai Weibull <[email protected]>
5" Latest Revision:	2015-05-29
6" License:		Vim (see :h license)
7" Repository:		https://github.com/chrisbra/vim-zsh
8
9if exists("b:did_ftplugin")
10  finish
11endif
12let b:did_ftplugin = 1
13
14let s:cpo_save = &cpo
15set cpo&vim
16
17let b:undo_ftplugin = "setl com< cms< fo<"
18
19setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
20
21let b:match_words =
22      \   &matchpairs
23      \ . ',\<if\>:\<elif\>:\<else\>:\<fi\>'
24      \ . ',\<case\>:^\s*([^)]*):\<esac\>'
25      \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>'
26let b:match_skip = 's:comment\|string\|heredoc\|subst'
27
28let &cpo = s:cpo_save
29unlet s:cpo_save
30