zsh-workers
 help / color / mirror / code / Atom feed
* vim-5.4l: patch to recognize ZSH new completion functions
@ 1999-06-08 12:12 Andrej Borsenkow
  1999-06-08 21:21 ` Bram Moolenaar
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 1999-06-08 12:12 UTC (permalink / raw)
  To: Bram, zsh-workers

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.

regards

/andrej

=================
--- scripts.vim.org	Mon Jun  7 18:14:38 1999
+++ scripts.vim	Tue Jun  8 16:03:15 1999
@@ -43,6 +43,10 @@
 elseif getline(1) =~ '^#!.*[/\\]zsh\>'
   set ft=zsh
 
+" Z shell completion functions
+elseif getline(1) =~ '^#compdef\>' || getline(1) =~ '^#autoload\>'
+  set ft=zsh
+
 " ELM Mail files
 elseif getline(1) =~ '^From [a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\= .*[12][09]\d\d$'
   set ft=mail


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vim-5.4l: patch to recognize ZSH new completion functions
  1999-06-08 12:12 vim-5.4l: patch to recognize ZSH new completion functions Andrej Borsenkow
@ 1999-06-08 21:21 ` Bram Moolenaar
  0 siblings, 0 replies; 2+ messages in thread
From: Bram Moolenaar @ 1999-06-08 21:21 UTC (permalink / raw)
  To: borsenkow.msk; +Cc: zsh-workers


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@moolenaar.net ---- Bram@vim.org ---\-\--
  \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-11 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-08 12:12 vim-5.4l: patch to recognize ZSH new completion functions Andrej Borsenkow
1999-06-08 21:21 ` Bram Moolenaar

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).