33787Re: Config Vim not to change directory timestamp
- Oct 4, 2003--- Gary Johnson <garyjohn@...> wrote:
> On 2003-10-03, Bram Moolenaar <Bram@...>USA
> > Roboco Sanchez wrote:
> > > Vim shouldn't change the timestamp of the
> directory in
> > > which the file it's saving resides. Vim is the
> > > editor to do so. It's really annoyance when you
> > > a file but your directory timestamp is also
> > > No, I'm not talking about swap file or backup
> > > I'm talking about the directory NNNN that Vim
> > > before saving the file and deletes just after
> the file
> > > is saved. So "set backupdir" or "set directory"
> > > wouldn't help. Please introduce "set secretdir"
> > > that NNN directory or just create it in the path
> > > "set backupdir" or "set directory". Many thanks.
> > I have no idea what you are talking about. Vim
> doesn't create a
> > directory next to the file it writes.
> > Anyway, if you write a file it's not strange that
> the directory it
> > contains is changed. You can avoid this by
> letting Vim overwrite the
> > original file (reset 'backup' and 'writebackup')
> but you risk loosing
> > your work if the power drops that moment. On Unix
> the directory is
> > still changed anyway, since the timestamp of the
> file is updated.
> The file's timestamp is kept in the inode, not in
> the directory, so
> changing a file's contents should not affect the
> If I have
> set nobackup
> set nowritebackup
> set noswapfile
> in my ~/.vimrc, and I use vim to modify a file, the
> directory time
> stamp is not changed. (This is using vim-6.2 on
> HP-UX 10.20.)
> I have no idea what this "NNN directory" could be,
> either. Some
> Gary Johnson | Agilent Technologies
> garyjohn@... | Wireless Division
> | Spokane, Washington,
You solution does solve the problem of directory
timestamp but you won't have the backup file in your
backup dir. I would still want both swapfile and
backupfile as normal.
Vim does create a dir named NNNN where N is a decimal
digit even though you use "set backupdir" to tell Vim
to write backup file somewhere else. If you use
Windows you can use Sysinternals' FileMon to monitor
Vim's disk activities and you'll see the real name of
the dir I'm talking about. On *NIX I'm not sure what
tool to use.
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
- << Previous post in topic Next post in topic >>