1832244 Members
3157 Online
110041 Solutions
New Discussion

vi fstab RHEL3

 
Brian Shepard
Advisor

vi fstab RHEL3

I just started using RHEL3 and have noticed that vi uses color bits. My concern is when I vi my fstab, my NFS mount entries are reverse video red. I am guessing that vi is telling me that these fstab entries are not formatted correctly. What's interesting is that I have absolutely no problems mounting these filesystems. No errors, no problems. Why is vi displaying these entries in reverse video red?

-Brian
4 REPLIES 4
K.C. Chan
Trusted Contributor

Re: vi fstab RHEL3

This is ok, I think vi is an alias to vim; at least on my linux box. You can call vi directly or unalias the alias. Another way is use view, then force a write if you want to save changes.
Reputation of a thousand years can be determined by the conduct of an hour
Ivan Ferreira
Honored Contributor

Re: vi fstab RHEL3

I think that there should be no errors on the fstab, maybe vi is trying to use syntax checking, usefull in scripts. If you want to disable that, use

:syntax off

If you don't like it configure the command in the $HOME/.vimrc file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Brian Shepard
Advisor

Re: vi fstab RHEL3

Thanks, I appreciate the reassurance.
I always knew the entries were correct, but RHEL3's vi colors freaked me out. Thanks again, much appreciated!
Mike Stroyan
Honored Contributor

Re: vi fstab RHEL3

The syntax highlighting information for fstab is in /usr/share/vim/vim63/syntax/fstab.vim.
It is likely that your NFS lines are valid but poorly described by that syntax file.
I don't see any substantial change to that file in RHEL4 or other vim distributions. I see reverse video red on the hostname parts of NFS lines on my systems.