Re: reserved words in vi(m)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 10, 2003 at 03:44:23AM -0600, Robert G. (Doc) Savage wrote:
> On Sun, 2003-11-09 at 21:29, Kwan Lowe wrote:
> > >
> > > When I was editing my /etc/fstab this morning, I noticed there are at
> > > least two defined fs_mntops values which vim displays differently than
> > > others. Most defined values in the fs_type and fs_mntops fields are
> > > green, but 'loop' and 'users' are either white on a red background (if
> > > the first option) or white on the default background (if not the first
> > > option).
> > >
> > > What file controls the color displays of these reserved words?
> > 
> > The files in /usr/share/vim/vim62/syntax control coloration.
> 
> Kwan,
> 
> Exactly right. Thanks very much. I appended 'users' and 'loop' to
> fstab.vim, and 'vi /etc/fstab' now appears as it should.
> 
> ...
> syn keyword fsOptionsGeneral async atime auto current defaults \
>      dev exec force fstab noatime noauto noclusterr noclusterw \
>      nodev noexec nosuid nosymfollow nouser owner ro rdonly rw \
>      rq sw xx suid suiddir sync kudzu union update user \
>      supermount users loop
>                 ^^^^^ ^^^^
> ...
> 
> I should bugzilla this. And also the fstab man page to include the
> 'loop' option for mounting ISO images.
> 
> --Doc Savage
>   Fairview Heights, IL

My personal preference would be to add this to ~/.vim/syntax/fstab.vim:

	syn keyword fsOptionsGeneral users loop

That way, you don't have to change it every time you upgrade vim.

-chris




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux