zsh.vim 818 B

12345678910111213141516171819202122232425262728
  1. " Vim filetype plugin file
  2. " Language: Zsh shell script
  3. " Maintainer: Christian Brabandt <cb@256bit.org>
  4. " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
  5. " Latest Revision: 2017-11-22
  6. " License: Vim (see :h license)
  7. " Repository: https://github.com/chrisbra/vim-zsh
  8. if exists("b:did_ftplugin")
  9. finish
  10. endif
  11. let b:did_ftplugin = 1
  12. let s:cpo_save = &cpo
  13. set cpo&vim
  14. let b:undo_ftplugin = "setl com< cms< fo<"
  15. setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
  16. let b:match_words = ',\<if\>:\<elif\>:\<else\>:\<fi\>'
  17. \ . ',\<case\>:^\s*([^)]*):\<esac\>'
  18. \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>'
  19. let b:match_skip = 's:comment\|string\|heredoc\|subst'
  20. let &cpo = s:cpo_save
  21. unlet s:cpo_save