[PATCH] add syntax file for apt.conf

17 views
Skip to first unread message

bilibop project

unread,
Oct 4, 2012, 6:32:56 PM10/4/12
to vim...@googlegroups.com
Hi,

This patch adds support for APT config files.
Please let me know if it is in an appropriate format:

--- a/runtime/filetype.vim 2012-10-04 23:57:11.704541092 +0200
+++ b/runtime/filetype.vim 2012-10-05 00:00:35.989972876 +0200
@@ -112,6 +112,11 @@
" Apache config file
au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache

+" APT config file
+au BufNewFile,BufRead apt.conf setf aptconf
+au BufNewFile,BufRead */.aptitude/config setf aptconf
+au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf
+
" XA65 MOS6510 cross assembler
au BufNewFile,BufRead *.a65 setf a65

Thanks
quidame
aptconf.vim
filetype.diff

Bram Moolenaar

unread,
Oct 5, 2012, 4:16:19 PM10/5/12
to bilibop project, vim...@googlegroups.com

Quidame wrote:

> This patch adds support for APT config files.
> Please let me know if it is in an appropriate format:

Looks good. I'll include it.

Please don't forget to email me a new version if you make improvements.

Oh, which running my test script I notice that you need to set 'cpo' for
the line continuation:

Near the top:

let s:cpo_save = &cpo
set cpo&vim

And at the end:

let &cpo = s:cpo_save
unlet s:cpo_save



--
ARTHUR: If you do not open these doors, we will take this castle by force ...
[A bucket of slops land on ARTHUR. He tries to retain his dignity.]
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages