Bug#435552: Doesn't detect debcontrol files in non-debian/ dirs

Loïc Minier lool at dooz.org
Wed Aug 1 14:42:18 UTC 2007


Package: vim-runtime
Version: 1:7.1-022+1
Severity: minor
Tags: patch

        Hi,

 "vi control" on a debcontrol file wont turn on syntax highlighting
 (contrarily to a debchangelog for example); I think filetype.vim
 expects the real path to contain debian/control to set the ft to
 debcontrol.  Even doing a "ln -s . debian; vi debian/control" wont turn
 on syntax highlighting.

 It seems this is already taken care of for debchangelog by checking
 actual file contents instead of pathname, so I propose doing the same
 by adding this to filetype.vim:

au BufNewFile,BufRead control
        \  if getline(1) =~ '^Source:'
        \|   setf debcontrol
        \| endif

 You might want to remove the rule matching the full path if you add
 this snippet:

" Debian Control
au BufNewFile,BufRead */debian/control          setf debcontrol

   Thanks!

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-1-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim-full                     1:7.1-022+1 Vi IMproved - enhanced vi editor -
ii  vim-tiny                     1:7.1-022+1 Vi IMproved - enhanced vi editor -

-- no debconf information

-- 
Loïc Minier




More information about the pkg-vim-maintainers mailing list