Mapping keys and vimrc

2010-10-15 Thread Rahul Kumar
Hi, I would like to use the key mapping to print a string. 1) Ex: If i hit some character say p, I should print the following printf ("\n Debug \n"); 2) Also, i'm using gvim on window but the vimrc file present in the mapped drive of a is being used. What changes should i make so that i can

Re: Mapping keys and vimrc

2010-10-15 Thread Gary Johnson
On 2010-10-15, Rahul Kumar wrote: > Hi, > > I would like to use the key mapping to print a string. > > 1) Ex: If i hit some character say p, I should print the following > printf ("\n Debug \n"); One way to do that is with an abbreviation: iabbrev p printf ("\n Debug \n"); See :he

Re: Mapping keys and vimrc

2010-10-15 Thread Rahul Kumar
Thanks for your reply. 1) I tried with iabbrev p printf ("\n Debug \n"); by inserting in vimrc file also entering in vim file using :iabbrev p printf ("\n Debug \n"); i cannot see printf statement getting inserted with i hit 'p'. 2) echo $VIM has the same value with the one you mentioned. But i c

Re: Mapping keys and vimrc

2010-10-15 Thread Francisco Dibar
> 1) I tried with iabbrev p printf ("\n Debug \n"); by inserting in > vimrc file also entering in vim file using :iabbrev p printf ("\n > Debug \n"); > i cannot see printf statement getting inserted with i hit 'p'. The printf appears after hitting p AND the space key :) -- You received this mess

Re: Mapping keys and vimrc

2010-10-15 Thread Ben Fritz
On Oct 15, 12:02 pm, Rahul Kumar wrote: > 2) echo $VIM has the same value with the one you mentioned. But i can > see $HOME is pointing to the mapped drive (linux machine) > which has the vimrc file. > > snippet of version output: > > system vimrc file: "$VIMRC\vimrc" > user vimrc file: "$HOME\_

Re: Mapping keys and vimrc

2010-10-15 Thread Ben Fritz
On Oct 15, 12:48 pm, Francisco Dibar wrote: > > 1) I tried with iabbrev p printf ("\n Debug \n"); by inserting in > > vimrc file also entering in vim file using :iabbrev p printf ("\n > > Debug \n"); > > i cannot see printf statement getting inserted with i hit 'p'. > > The printf appears after

Re: Mapping keys and vimrc

2010-10-15 Thread Gary Johnson
On 2010-10-15, Rahul Kumar wrote: > Thanks for your reply. > > 1) I tried with iabbrev p printf ("\n Debug \n"); by inserting in > vimrc file also entering in vim file using :iabbrev p printf ("\n > Debug \n"); > i cannot see printf statement getting inserted with i hit 'p'. As Francisco wrote, y

Re: [solved] Mapping keys and vimrc

2010-10-15 Thread Rahul Kumar
1) Sorry, i tried in normal mode. Its working fine in insert mode. 2). After copying the windows _vimrc file to linux machine, i could use regular windows commands with CTRL, ALT keys. Thank y'all for the suggestions. On Fri, Oct 15, 2010 at 2:25 PM, Gary Johnson wrote: > On 2010-10-15, Rahul