saving unnamed buffer

2006-08-21 Thread Yakov Lerner
I want to make saving of unnamed buffers possible as follows: When I do :w on a unnamed buffer, I want it to save to the file /tmp/N where N is number. I tried the simple code below, but it does not work. I am getting 'E32: No file name', same error as without this code. How do I fix it ?

Re: saving unnamed buffer

2006-08-21 Thread A.J.Mechelynck
Yakov Lerner wrote: I want to make saving of unnamed buffers possible as follows: When I do :w on a unnamed buffer, I want it to save to the file /tmp/N where N is number. I tried the simple code below, but it does not work. I am getting 'E32: No file name', same error as without this code.

Re: saving unnamed buffer

2006-08-21 Thread Yakov Lerner
On 8/21/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Yakov Lerner wrote: I want to make saving of unnamed buffers possible as follows: When I do :w on a unnamed buffer, I want it to save to the file /tmp/N where N is number. I tried the simple code below, but it does not work. I am getting

Re: saving unnamed buffer

2006-08-21 Thread Yakov Lerner
On 8/21/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 8/21/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Yakov Lerner wrote: I want to make saving of unnamed buffers possible as follows: When I do :w on a unnamed buffer, I want it to save to the file /tmp/N where N is number. I tried

Re: saving unnamed buffer

2006-08-21 Thread A.J.Mechelynck
Yakov Lerner wrote: On 8/21/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 8/21/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Yakov Lerner wrote: I want to make saving of unnamed buffers possible as follows: When I do :w on a unnamed buffer, I want it to save to the file /tmp/N where N is

Re: saving unnamed buffer

2006-08-21 Thread Jürgen Krämer
Hi, A.J.Mechelynck wrote: Yakov Lerner wrote: I fixed another bug, the '*' missing in the autocommand: au BufWritePre * if(expand('%') == '') | exe file .TempName() | endif au BufWritePre * if(expand('%') == '') | exe saveas .TempName() | endif , but still no luck. I'm still

Re: saving unnamed buffer

2006-08-21 Thread Yakov Lerner
On 8/21/06, Jürgen Krämer [EMAIL PROTECTED] wrote: Hi, A.J.Mechelynck wrote: Yakov Lerner wrote: I fixed another bug, the '*' missing in the autocommand: au BufWritePre * if(expand('%') == '') | exe file .TempName() | endif au BufWritePre * if(expand('%') == '') | exe saveas

Re: saving unnamed buffer

2006-08-21 Thread Yakov Lerner
On 8/21/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Yakov Lerner wrote: On 8/21/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 8/21/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Yakov Lerner wrote: I want to make saving of unnamed buffers possible as follows: When I do :w on a unnamed

Re: saving unnamed buffer

2006-08-21 Thread Gary Johnson
On 2006-08-21, Yakov Lerner [EMAIL PROTECTED] wrote: On 8/21/06, Jürgen Krämer [EMAIL PROTECTED] wrote: Hi, A.J.Mechelynck wrote: Yakov Lerner wrote: I fixed another bug, the '*' missing in the autocommand: au BufWritePre * if(expand('%') == '') | exe file