29851Re: Save file w/ orig mtime?
- Jul 1, 2002On Mon, Jul 01, 2002 at 01:57:31AM +0000, Soren Andersen wrote:
> text but I would not be. I would typically be wanting to be*nod* Makes sense.
> (re)formatting some textfile (say, a news or email posting saved to my
> Thank you very much for the work you put in. I have to admit I amIgnore it, its meaningless :)
> puzzled by some of it. Who or what is "- sed bob" anyway? Is that a
> "~/vim/mtime.vim"). Then if I ':source [pathtothisfile]mtime.vim' ICorrect.
> will be able to do... something ...
> openbox% vim header.js -c 'so ~/vim/mtime.vim|call append("$", "//Test")|wq'On this line I'm opening the file and executing the commands:
source mtime.vim " load the instructions
call append( ... ) " Do something to change the file
wq " Save and quit as normal.
This is just because I could show it on the command line.
> Sorry but the commands are pretty opaque to me. OK ... My understandingheh.
> is that you are in a manner typical of an expert user, combining
> several things into a very concise (and obfuscated) form: sourcingThat's completely correct. It was just a compact way to say "look this was
> (':so') the new 'mtime.vim' file and calling ('call') the func 'append'
> to add the line '//Test' then issuing command ':wq!' all in one
> compound command. OK, good enough. I will play with this and see. Will
the last modification time, and the last line of the file, now I do something
to the file and the last 2 lines are this, but the last modification time
> the mtime.vim code affect other buffers that might be open at the sameYes it will affect all saves. If you wanted to restrict it, change the
> time, because I use GVIM and usually have split windows? Will there be
> anything 'global' I have to watch out for or will only the file I've
> opened with the ':so[urce]' command be affected by the directive to
> "save with no change in mtime"?
autocmd pattern match from * to something else. If you only wanted it to
apply to files in your mail directory (for example) you could replace the
* with a directory to match. See the help for "autocmd" for details on this.
Then graphics games came along and the computer using portion of the human race
forgot all about 500,000 years of language evolution and went straight back to
the electronic equivalent of banging rocks together - the point'n'click game
- << Previous post in topic