Re: Automatically insert something when open a file

2011-09-16 Thread Ben Fritz
On Sep 16, 12:46 am, Gary Johnson garyj...@spocom.com wrote: On 2011-09-15, Stanley Rice wrote: I am sorry that I didn't fully express my question. In short, all I want to do it to insert a string , i.e.Modified: in the first line of a newly open file. Is that possible?     au

Re: Automatically insert something when open a file

2011-09-15 Thread Tim Chase
On 09/15/11 08:25, Stanley Rice wrote: I have write some code that can change the modified data. I search for the first 10 line of the current file, and search for the key word Modified: , and then replace the content after the keyword with current time stamp each time I save the file. I thought

Re: Automatically insert something when open a file

2011-09-15 Thread Ben Fritz
On Sep 15, 8:32 am, Tim Chase v...@tim.thechases.com wrote: On 09/15/11 08:25, Stanley Rice wrote: I have write some code that can change the modified data. I search for the first 10 line of the current file, and search for the key word Modified: , and then replace the content after

Re: Automatically insert something when open a file

2011-09-15 Thread Stanley Rice
I am sorry that I didn't fully express my question. In short, all I want to do it to insert a string , i.e.Modified: in the first line of a newly open file. Is that possible? On Sep 15, 10:52 pm, Ben Fritz fritzophre...@gmail.com wrote: On Sep 15, 8:32 am, Tim Chase v...@tim.thechases.com

Re: Automatically insert something when open a file

2011-09-15 Thread Gary Johnson
On 2011-09-15, Stanley Rice wrote: I am sorry that I didn't fully express my question. In short, all I want to do it to insert a string , i.e.Modified: in the first line of a newly open file. Is that possible? au BufNewFile *.txt put! ='Modified:' where you should change the file