Bug#322850: marked as forwarded (vim-common: asterisk config
highlighting)
Debian Bug Tracking System
owner at bugs.debian.org
Sun Sep 18 21:03:24 UTC 2005
Your message dated Sun, 18 Sep 2005 22:53:25 +0200
with message-id <20050918205325.GA31549 at takhisis.invalid>
has caused the Debian Bug report #322850,
regarding vim-common: asterisk config highlighting
to be marked as having been forwarded to the upstream software
author(s) Bram Moolenaar <Bram at moolenaar.net>.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
---------------------------------------
Received: (at 322850-forwarded) by bugs.debian.org; 18 Sep 2005 20:53:25 +0000
>From zack at bononia.it Sun Sep 18 13:53:25 2005
Return-path: <zack at bononia.it>
Received: from sockmel.bononia.it [194.242.226.39]
by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
id 1EH6A8-00026Y-00; Sun, 18 Sep 2005 13:53:25 -0700
Received: from muletto.takhisis.invalid (85-18-14-42.fastres.net [85.18.14.42])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "Stefano Zacchiroli", Issuer "sockmel.bononia.it" (verified OK))
by sockmel.bononia.it (Postfix) with ESMTP id C287256E29;
Sun, 18 Sep 2005 22:53:22 +0200 (CEST)
Received: by muletto.takhisis.invalid (Postfix, from userid 1000)
id C5FBFE66D6; Sun, 18 Sep 2005 22:53:25 +0200 (CEST)
Date: Sun, 18 Sep 2005 22:53:25 +0200
From: Stefano Zacchiroli <zack at debian.org>
To: Bram Moolenaar <Bram at moolenaar.net>
Cc: 322850-forwarded at bugs.debian.org,
322850-submitter at bugs.debian.org
Subject: support for Asterisk configuration files highlighting (patch included)
Message-ID: <20050918205325.GA31549 at takhisis.invalid>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="wq9mPyueHGvFACwf"
Content-Disposition: inline
User-Agent: Mutt/1.5.10i
Delivered-To: 322850-forwarded at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2005_01_02
--wq9mPyueHGvFACwf
Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn"
Content-Disposition: inline
--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
A debian user provided a patch which adds support for syntax
highlighting of Asterisk [1] configuration files. The patch is attached,
it includes both the asterisk.vim which define the highlighting rules
and the needed changes to filetype.vim.
Could you please consider shipping it in future releases of vim?
Thanks in advance,
Cheers.
[1] http://www.asterisk.org/
--=20
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-
--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="141_asterisk.vim.diff"
Content-Transfer-Encoding: quoted-printable
diff -urN vim63/runtime/filetype.vim vim63.new/runtime/filetype.vim
--- vim63/runtime/filetype.vim 2005-09-18 22:46:39.000000000 +0200
+++ vim63.new/runtime/filetype.vim 2005-09-18 22:45:27.000000000 +0200
@@ -173,6 +173,9 @@
" Macro (VAX)
au BufNewFile,BufRead *.mar setf vmasm
=20
+" Asterisk config file
+au BufNewFile,BufRead *asterisk/*.conf* setf asterisk=20
+
" Atlas
au BufNewFile,BufRead *.atl,*.as setf atlas
=20
diff -urN vim63/runtime/syntax/asterisk.vim vim63.new/runtime/syntax/asteri=
sk.vim
--- vim63/runtime/syntax/asterisk.vim 1970-01-01 01:00:00.000000000 +0100
+++ vim63.new/runtime/syntax/asterisk.vim 2005-09-18 22:44:07.000000000 +02=
00
@@ -0,0 +1,73 @@
+" Vim syntax file
+" Language: Asterisk config file
+" Maintainer: brc007
+" Last Change: 2005 Mar 7
+" version 0.2
+"
+" Additional changes made 2005 Mar 7 by Corydon76
+" * CVS priority, including n and s, and new label definitions
+" * ENV( and LEN( support
+" * Class patterns in extensions now match only the class pattern (instead=
of to a following expression)
+" * anthm's functions are matched
+" * Variables now appear in their own colors inside expressions
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+"testing only
+syn sync clear
+syn sync fromstart
+
+
+syn keyword asteriskTodo TODO contained
+syn match asteriskComment ";.*" contains=3DasteriskTodo
+syn match asteriskContext "\[.\{-}\]"
+syn match asteriskExten "^\s*exten\s*=3D>"
+syn match asteriskApp "\s*,\s*\zs[a-zA-Z]*\ze"
+" Digits plus oldlabel (newlabel)
+syn match asteriskPriority ",[[:digit:]]\+\(+[[:alpha:]][[:al=
num:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?,"
+" s or n plus digits (newlabel)
+syn match asteriskPriority ",[sn]\(+[[:digit:]]\+\)\?\(([[:al=
pha:]][[:alnum:]_]*)\)\?,"
+syn match asteriskIncludeBad "^\s*#\s*[[:alnum:]]*"
+syn match asteriskInclude "^\s#\sinclude\s.*"
+syn match asteriskVar "\${_\{0,2}[[:alpha:]][[:alnum:]_]=
*\(:[[:digit:]]\+\)\{0,2}}"
+syn match asteriskVarLen "\${_\{0,2}[[:alpha:]][[:alnum:]_]=
*(.\{-})}" contains=3DasteriskVar,asteriskVarLen,asteriskExp
+syn match asteriskExp "\$\[.\{-}\]" contains=3DasteriskV=
ar,asteriskVarLen,asteriskExp
+syn match asteriskFunc "\$([[:alpha:]][[:alnum:]_]*.*)" c=
ontains=3DasteriskVar,asteriskVarLen,asteriskExp
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting y=
et
+:if version >=3D 508 || !exists("did_conf_syntax_inits")
+ if version < 508
+ let did_conf_syntax_inits =3D 1
+ command -nargs=3D+ HiLink hi link <args>
+ else
+ command -nargs=3D+ HiLink hi def link <args>
+ endif
+
+
+ HiLink asteriskComment Comment
+" not sure what type this should be, using String for testing.
+ HiLink asteriskExten String
+" same here
+ HiLink asteriskContext Identifier=20
+ HiLink asteriskApplication Statement
+ HiLink asteriskInclude Preproc=20
+ HiLink asteriskIncludeBad Error
+ HiLink asteriskPriority Preproc=09
+ HiLink asteriskVar String
+ HiLink asteriskVarLen Function
+ HiLink asteriskExp Type
+ delcommand HiLink
+endif
+
+
+let b:current_syntax =3D "asterisk"=20
+
+" vim: ts=3D8 sw=3D2
--bp/iNruPH9dso1Pn--
--wq9mPyueHGvFACwf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDLdPF1cqbBPLEI7wRAnO0AJ4pz6KwJleHoWAYV7Ln6HLRlefXyQCeJAa0
YI3jK56p3PosGwBhMF0cwT0=
=PBi7
-----END PGP SIGNATURE-----
--wq9mPyueHGvFACwf--
More information about the pkg-vim-maintainers
mailing list