What you need, is rather 'modeline' and not 'modelines'

from :help 'modeline':
                                   *'modeline'* *'ml'* *'nomodeline'* *'noml'*
'modeline' 'ml'         boolean (Vim default: on (off for root),
                                 Vi default: off)
                        local to buffer
                                                *'modelines'* *'mls'*

It's means, 'modeline' is off for root by default.

--
Anton

2008/11/3, Linda W <[EMAIL PROTECTED]>:
>
> I'm running a SuSE system 10.3 and am wondering if they
> corrupted vim or if there is some other logical reason why
> root can't read modelines.
>
> I use modelines in my system config files to change defaults.
> I know that at some point a default line of
> set modelines=0 was set near the end of /etc/vimrc
>
> I commented it out (1st), and later tried explicitly setting it
> to the default (5).
>
> I have the same .vimrc, in my ~root as in my ~user dir.
> I EVEN set HOME (for root) = ~user, and ran vim so it would
> use my ~user settings -- it DID, at least use the .viminfo, since
> when I opened my testfile
> (created testfile /tmp/syslog) -- a copy of a logrotate.d/<configfile>)
>
> The 1st modeline I tried was
> # vim: ts=4:sw=4
> I later changed the last 3 lines in the file to:
> # vi: ts=4:sw=4
> # vim: ts=4:sw=4
> # gvim: ts=4:sw=4
>
> Anyway I try it, the user signon does read the modeline, but root
> will not.
>
> I don't remember this always being the case -- as I use modelines
> in config files, often, to reset tabstops...
>
> Is there something I'm missing somewhere?  I have added explicit
> set modelines=5 to both my system /etc/vimrc
> and root's .vimrc, yet they are ignored.
>
> I've looked through the standard vim directories for anything that might
> be setting (or resetting) modelines, (ran vim -V10 to see all files it read
> in,
> and I think I checked all the file dirs it looked into or ran files from).
>
> Any ideas?
> Supposedly, modelines can allow execution of external scripts which can
> launch commands - possibly compromising security, but at least if the
> file is owned by root it shouldn't be ignoring modelines --
> If arbitrary commands can be run from modelines, I can just as easily
> be running a syslog-command about each system-config file that is
> edited, into the syslog -- in which case, turning off modelines  would
> simply turn off my default security logging (regardless of how great
> that would be for some OTHER system's security policy)...
>
> I'm wanting to extract hairs from painful parts of my body (or maybe
> painful parts of whoever caused this, if its not some "stupo" on my part
> :-))...
>
> Help?
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to