Re: cmapping woes

2006-05-22 Thread Eric Arnold
On 5/21/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 5/22/06, Eric Arnold [EMAIL PROTECTED] wrote: I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of them, I seem to be getting errors as if expr is run

Re: cmapping woes

2006-05-22 Thread Eric Arnold
On 5/21/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: On Sun, 21 May 2006 at 3:12pm, Eric Arnold wrote: I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of them, I seem to be getting errors as if expr

Re: cmapping woes

2006-05-22 Thread Yakov Lerner
On 5/22/06, Eric Arnold [EMAIL PROTECTED] wrote: On 5/21/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 5/22/06, Eric Arnold [EMAIL PROTECTED] wrote: I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of

Re: cmapping woes

2006-05-22 Thread Yakov Lerner
On 5/22/06, Eric Arnold [EMAIL PROTECTED] wrote: Eric, this works for me: -- cnoremap xx c-r=getcmdpos()==1?MyFunc():'xx'cr function! MyFunc() call feedkeys(:call DoIt()\cr, 't') return '' endfu And DoIt() is executed not in sandbox. Does this work for you ? Yakov

Re: cmapping woes

2006-05-22 Thread Eric Arnold
On 5/22/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 5/22/06, Eric Arnold [EMAIL PROTECTED] wrote: Eric, this works for me: -- cnoremap xx c-r=getcmdpos()==1?MyFunc():'xx'cr function! MyFunc() call feedkeys(:call DoIt()\cr, 't') return '' endfu And DoIt() is

cmapping woes

2006-05-21 Thread Eric Arnold
I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of them, I seem to be getting errors as if expr is run in the sandbox (that dog won't hunt). The only one that works at all is the first simple mapping, but

Re: cmapping woes

2006-05-21 Thread Gerald Lai
On Sun, 21 May 2006, Eric Arnold wrote: I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of them, I seem to be getting errors as if expr is run in the sandbox (that dog won't hunt). The only one that

Re: cmapping woes

2006-05-21 Thread Yakov Lerner
On 5/22/06, Eric Arnold [EMAIL PROTECTED] wrote: I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of them, I seem to be getting errors as if expr is run in the sandbox (that dog won't hunt). The only one

Re: cmapping woes

2006-05-21 Thread Hari Krishna Dara
On Sun, 21 May 2006 at 3:12pm, Eric Arnold wrote: I've been trying to map cd if it's the first two characters on the :ex line. I've tried all the combinations I can think of. On several of them, I seem to be getting errors as if expr is run in the sandbox (that dog won't hunt). The only