TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

EditREPL - Open Vim from within the Python REPL

24 点作者 philipbjorge大约 12 年前

7 条评论

lbolla大约 12 年前
IPython has this feature baked in the magic %ed command [1].<p>[1]: <a href="http://ipython.org/ipython-doc/dev/config/editors.html" rel="nofollow">http://ipython.org/ipython-doc/dev/config/editors.html</a>
评论 #5395391 未加载
评论 #5395199 未加载
pixelmonkey大约 12 年前
IPython can also be run as a server (ipython kernel[1]) and then connected to via a vim plugin called vim-ipython [2]. This means you can do the other direction: evaluate a vim buffer in a running IPython session, and then connect to that IPython session to actually use the code you wrote in vim.<p>See:<p>[1] <a href="http://wiki.ipython.org/Cookbook/Connecting_to_a_remote_kernel_via_ssh" rel="nofollow">http://wiki.ipython.org/Cookbook/Connecting_to_a_remote_kern...</a><p>[2] <a href="https://github.com/ivanov/vim-ipython" rel="nofollow">https://github.com/ivanov/vim-ipython</a>
bitwize大约 12 年前
Nice. Reminds me of a feature I have in Glass Table[0]:<p>Define a procedure, macro, or record type called foo:<p><pre><code> (define (foo x) ...) </code></pre> Now say:<p><pre><code> ,(edit foo) </code></pre> Your definition appears in the editor of your choice. (Try running GT within Emacs and setting your EDITOR to "emacsclient".) Make changes; provided no errors occurred (like missing parens) the changes take effect when you save and quit.<p>It's a nice little workflow; if you squint, it almost feels like a CADR...<p>[0] <a href="https://github.com/bitwize/glasstable" rel="nofollow">https://github.com/bitwize/glasstable</a>
JulianWasTaken大约 12 年前
Cool.<p>Haven't looked at the code yet, but I wrote:<p><a href="https://github.com/Julian/dotfiles/blob/master/.config/python/rc.py#L53" rel="nofollow">https://github.com/Julian/dotfiles/blob/master/.config/pytho...</a><p>which does something similar (and is interpreter agnostic as it looks like this is).
评论 #5395299 未加载
ashayh大约 12 年前
For Ruby IRB, there is interactive editor: <a href="http://vimcasts.org/episodes/running-vim-within-irb/" rel="nofollow">http://vimcasts.org/episodes/running-vim-within-irb/</a>
jlgreco大约 12 年前
I could be mistaken, but isn't this a GNU Readline feature?<p>Neat regardless.
评论 #5395152 未加载
Glench大约 12 年前
oh my god this is awesome