I haven't tried it, but this may work:

  :imap <f6> <esc>:w<cr>:!ruby %<cr><cr>a


On Wed, Jun 18, 2014 at 1:04 PM, Arup Rakshit <[email protected]> wrote:

> On Wednesday, June 18, 2014 01:17:38 PM David Stanek wrote:
> > On Wed, Jun 18, 2014 at 11:40 AM, Arup Rakshit <
> [email protected]>
> > >
> > > The above 2 are coming when I pressed *F6* in *insert* mode.
> >
> > Try changing your mapping to:
> > :imap <F6> <ESC>:w<CR>:!ruby %<CR>
> >
> > This is take you out of insert mode before saving your file and running
> it
> > through ruby.
>
> Hum. It is working. Can I back to insert mode, while pressing the key F6
> from
> insert mode,  after printing output and when I will press *Enter* key..
>
> --
> ================
> Regards,
> Arup Rakshit
> ================
> Debugging is twice as hard as writing the code in the first place.
> Therefore,
> if you write the code as cleverly as possible, you are, by definition, not
> smart enough to debug it.
>
> --Brian Kernighan
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
David
blog: http://www.traceback.org
twitter: http://twitter.com/dstanek
www: http://dstanek.com

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to