Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: vim-5.4l: patch to recognize ZSH new completion functions



Andrej -

> This patch enables vim to correctly recognize ZSH new completion functions
> as ZSH scripts. I hope, they are already in stable enough state to justify
> inclusion in VIM.

Looks OK.  I suppose the strings "#compdef" and "#autoload" would not appear
in a non-zsh file, like "bash"?

It's a bit shorter when combined with the other "if" for zsh:

" Z shell scripts
elseif getline(1) =~ '^#!.*[/\\]zsh\>'
	\ || getline(1) =~ '^#compdef\>'
	\ || getline(1) =~ '^#autoload\>'
  set ft=zsh

I'm using the new line-continuation method here, version 5.4* required.

Thanks for the suggestion!

- Bram

--
hundred-and-one symptoms of being an internet addict:
69. Yahoo welcoms you with your own start page

--/-/---- Bram Moolenaar ---- Bram@xxxxxxxxxxxxx ---- Bram@xxxxxxx ---\-\--
  \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /



Messages sorted by: Reverse Date, Date, Thread, Author