/* vim: ts=1 sw=1 et sc fo=cqwa1 tw=78 syntax=css */
Jürgen Krämer wrote:
if I read :help cpo-Z correctly you should *add* 'Z' to 'cpoptions' to
stop Vim from resetting the 'readonly' option, not *remove* it.
But apart from that are you sure that menu.vim is the culprit? When I
added
set cpo+=Z
as the last line of my .vimrc and executed
gvim :verb set cpo?
the result was
cpoptions=aABceFs
Last set from d:\Progs\vim\vim73\menu.vim
----
It was using the above that led me to my first post -- after trying to
turn this this behavior off... I don't remember it resetting to
read-only after each write... *in the same session*... (i.e. the file
permissions might be but maybe I didn't save as often then or made fewer
changes on such, or it just reset the perms so they were not read-only
after the first, but every time I tried to write, I had to use w!, which
got annoying).
That's when I began to look for why and found the cpoptions option --- I
looked at my .vimrc, and found it added the 'Z' option -- something
created probably 15 years or more ago when I first started using vim at
'sgi'. (it's funny, after 15 years, how difficult it is to use various
aspects of an editor I use every day -- especially in pattern making --
notice that I have more problems with "knowledge domain interfere"...
but I didn't intermix language usage as much as I do today...).
but with
gvim --noplugin
:verb set cpo?
it was
cpoptions=aABceFsZ
Last set from d:\Progs\vim\vim73\menu.vim
So it seems menu.vim correctly saves and restores the current value of
'cpoptions' but at least one other plugin did not. This is just an
impression from my setup, but a quick look at the source of menu.vim
seems to support that it is not the culprit here. You might have to take
a look at the other plugins that get sourced in your installation.
----
That may be the case, HOWEVER, With the option SET, OR UNSET... when
editing a R/O file, afterwriting it, the R/O bit was reset! I.e.
running as root, on linux,
editing a perl script, that was in /usr/bin, that was(is) set to
-r-xr-xr-x, (my user and root umasks are both set to 0002), the R/O bit
-re-enabled- after each 'w!'.
I never used to notice this behavior, as I'd had the 'Z' option set in
my vimrc for over a decade, I'd forgotten about it's presence.So
something has changed, but at the least, it seems peculiar that the
presence of 'Z' in my options seems to be ignored, now, when I write out
a file.
Hopefully this answers mark's curious desire to know my 'use case' as
well, as how I use a feature doesn't seem pertinent to whether or not
the feature works or not -- it's like reporting that the radio in your
car doesn't work, and someone replying "and what type of music are you
listening to on your radio?"... (how are you using it?)...
Um...
I can only point to my lastfm musical obscurity index
(http://www.last.fm/user/Astaras)... My habits (at least in music) are
98.4% more obscure than the average user. I suspect my Vim usage is may
not be _completely_ different. ;-)
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php