长ipython命令:提交/导航
有时我会在ipython中输入一个长语句长ipython命令:提交/导航,ipython,Ipython,有时我会在ipython中输入一个长语句 In [4]: def foo(): ...: a ...: bery # here's the error ...: long ...: function ...: definition ...: that ...: has ...: some ...: error ...: at ...: the
In [4]: def foo():
...: a
...: bery # here's the error
...: long
...: function
...: definition
...: that
...: has
...: some
...: error
...: at
...: the
...: top
...:
我希望能够修复错误并提交函数,但我的工作流是这样的
In [7]: def foo():
...: a
...: very # 2) FIXED - I want to be able to ENTER from this line
...: # 3) but instead I get a newline
...: long
...: function
...: definition
...: that
...: has
...: some
...: error
...: at
...: the
...: top
...: # 1) I have to start here and scroll all the way to the top
...: # 4) so now I have to scroll all the way down here to ENTER the fixed function
...:
有什么建议吗
- 更有效地导航到我要编辑的代码的顶部
- 能够从不是结尾的行提交
编辑:如果有帮助,另一个有用的技巧是Ctrl+O在同一单元格中输入新行,而不管iPython是否愿意。与ESC+返回相反。谢谢!如果您找到了快速导航的解决方案,请务必告诉我。这里似乎有更多文档:我们还可以使用此选项进入vim命令模式--TerminalInteractiveShell.editing_mode=vi请参阅