vim doesn't recognize UUID labels in fstab

Bug #108823 reported by Mathias Hasselmann
4
Affects Status Importance Assigned to Milestone
vim
Fix Released
Undecided
Unassigned
vim (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: vim

Vim supports syntax highlighting for /etc/fstab, but displays UUID mounted devices as error:

UUID=d3f9559a-0056-4942-ab3c-475883712f19 / ext3 defaults,errors=remount-ro 0 1

The device part of this line is shown with white text on red background. To work arround this, I have a fstab.vim file in my ~/.vim/after/syntax/ folder. The file has this content:

syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
hi def link fsDeviceUUID String

Those entries should be merged into /usr/share/vim/vim70/syntax/fstab.vim:

--- fstab.vim.orig 2007-04-22 09:43:29.000000000 +0200
+++ fstab.vim 2007-04-22 09:44:20.000000000 +0200
@@ -26,7 +26,9 @@
 syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:]\|^\w\{-}\ze\W\)/ contained
 syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts sysfs usbfs
 syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
+syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
 syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator
+syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator

 " Mount Point
 syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError
@@ -197,6 +199,7 @@
        HiLink fsTypeKeyword Type
        HiLink fsDeviceKeyword Identifier
        HiLink fsDeviceLabel String
+ HiLink fsDeviceUUID String
        HiLink fsFreqPassNumber Number

        if exists('fstab_unknown_fs_errors')

Revision history for this message
Joachim Sauer (saua) wrote :

Confirming both the bug as existing and the patch as fixing the problem

Changed in vim:
status: Unconfirmed → Confirmed
Revision history for this message
Laurent Bigonville (bigon) wrote :

Mail sent to <email address hidden>

Revision history for this message
Laurent Bigonville (bigon) wrote :

looks fixed in gutsy (1:7.1-000+1ubuntu1)

Changed in vim:
status: Unconfirmed → Fix Released
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.