On Tuesday, 17 June 2014 17:37:47 UTC+5:30, LCD 47 wrote:
> On 17 June 2014, Nishant Varma <nishant.varma@gmail.com> wrote:
>
> > Usecase:
>
> >
>
> > I write/copy paste lot of snippets that needs to be evaluated
>
> > in REPL . For example the second answer to this questions
>
> > http://stackoverflow.com/questions/100003/what-is-a-metaclass-in-python .
>
> >
>
> > Problem:
>
> > I can do this by copy paste or loading the entire file in REPL but its
>
> > an overhead sometimes .
>
> >
>
> > Solution ?
>
> > What is the simplest way to pass a visual region to a repl in an
>
> > interactive manner ?
>
> [...]
>
>
>
> Not sure this would qualify as "simplest", but IPython[0] +
>
> vim-ipython[1] can do that for Python. The Vim plugin used to have a
>
> number of issues, but maybe they have been fixed in the mean time.
>
>
>
> /lcd
>
>
>
> [0]: http://ipython.org/
>
> [1]: https://github.com/ivanov/vim-ipython
Thanks LCD .
Another Trivial solution is :
vnoremap <F6> :w! /tmp/tmp.py <bar> !python -i /tmp/tmp.py<CR>
nnoremap <F6> :w! /tmp/tmp.py <bar> !python -i /tmp/tmp.py<CR>
But its hard coded to Python .
I wanted to make it generic somehow .
--
--
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