-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: puppet
Version: 0.22.1-1
Severity: wishlist
Tags: patch

Hi Matthew!

I found out how the puppet vim syntax highlighting can be installed:

(16:25:35) The topic for #debian-vim is: Maintenance of vim-related
Debian packages | http://alioth.debian.org/projects/pkg-vim/
(16:26:24) Rhonda: jamessan: So registering it for a filename match or
line match isn't really offered yet, do I read that correct?
(16:26:54) DavidS: hi! how can a debian package add to vim's syntax
highlighting? I guess the syntax file goes to
/usr/share/vim/vim70/syntax, but how/where do I teach vim to detect the
filetype?
(16:27:30) Rhonda: DavidS: The question preceeded you. :P
(16:27:54) DavidS: me too!
(16:27:56) DavidS: ;)
(16:28:01) jamessan: yeah.  that requires modification of a single file
by all packages, which is more difficult. the best option is to leave
instructions for the user in README.Debian that tells them something
along the lines of "put 'autocmd BufRead,BufNewFile *.foo set ft=foo' in
your .vimrc or read up in ':he new-filetype' for other ways to recognize
the filetype"
(16:28:36) jamessan: actually
(16:28:40) DavidS: someone recommended to "simply add a "# :set
syntax=puppet" to each file"
(16:28:49) Rhonda: jamessan: Can't that somehow be done through an
include directory and some runtimepath magic or such?
(16:28:55) jamessan: you could possibly use
/usr/share/vim/addons/ftdetect/foo.vim
(16:29:11) Rhonda: DavidS: I usually put "# :vim:ft=puppet:" into them.
(16:30:00) Rhonda: But having it directly done is more convenient, yes.
(16:30:02) jamessan: Rhonda: detecting filetype by filename can easily
be done via the ftdetect directory. doing the same by file *contents*
isn't as easy
(16:30:24) Rhonda: That reminds me, we need to add filetype detection
for the ldapvi temporary files to have them the ldif syntax loaded.  ;)
(16:30:38) jamessan: zack could explain the vim-registry stuff if you
want to use that :)
(16:30:41) Rhonda: Ah, ftdetect - cool.  :)
(16:31:26) DavidS: it's just "au! BufRead,BufNewFile *.pp
setfiletype puppet"
(16:31:47) jamessan: well, without the !
(16:32:34) Rhonda: Ah, then it can be done through ftdetect directory.
(16:32:59) DavidS: to /usr/share/vim/addons/ftdetect/puppet.vim and
puppet.vim (containing the syntax stuff) to
/usr/share/vim/vim70/syntax/puppet.vim ?
(16:34:26) Rhonda: Yes.
(16:34:34) Rhonda: :help ftdetect " is helpful, too
(16:36:23) DavidS: thanks

Kudos to #debian-vim on oftc.net


It'd be really great if you could include that. To summarise:

just "au BufRead,BufNewFile *.pp setfiletype puppet" to
/usr/share/vim/addons/ftdetect/puppet.vim and ext/vim/puppet.vim to
/usr/share/vim/vim70/syntax/puppet.vim. 

:help ftdetect should give help from within vim.

If you don't come around to it, I'll take a look at it after my
holidays.


Regards, David

- -- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-vserver-686
Locale: LANG=C, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)

Versions of packages puppet depends on:
ii  adduser                3.102             Add and remove users and groups
ii  facter                 1.3.5-1           a library for retrieving facts 
fro
ii  libopenssl-ruby        1.0.0+ruby1.8.2-1 OpenSSL interface for Ruby
ii  libxmlrpc-ruby         1.8.2-1           XML-RPC support for Ruby
ii  lsb-base               3.1-23            Linux Standard Base 3.1 init 
scrip
ii  ruby                   1.8.2-1           An interpreter of object-oriented 

Versions of packages puppet recommends:
ii  rdoc                          1.8.2-1    Generate documentation from ruby 
s

- -- no debconf information

- -- 
- - hallo... wie gehts heute?
- - *hust* gut *rotz* *keuch*
- - gott sei dank kommunizieren wir über ein septisches medium ;)
 -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF5aNH/Pp1N6Uzh0URAiO9AKCeulI+C3VsurUkKWW/TMolSLDrBwCgmAYr
YtmJnAwLZiZCe42eOEkFWjI=
=JY30
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to