Wednesday, June 18, 2014

Re: Key mapping not working in Insert mode of vim

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 <tuka.08@gmail.com> wrote:
On Wednesday, June 18, 2014 01:17:38 PM David Stanek wrote:
> On Wed, Jun 18, 2014 at 11:40 AM, Arup Rakshit <aruprakshit@rocketmail.com>
> >
> > 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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



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

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment