如何使用 Canopy IDE 创建键盘快捷键以在代码编辑器和 ipython 控制台之间切换?
我尝试根据代码编辑文档(http://docs.enthought.com/canopy/configure/editor-scripting-api.html#code-editor-scripting-commands)和 ipython 窗格脚本命令编写宏(http://docs.enthought.com/canopy/configure/ipython-scripting-api.html#ipython-pane-scripting-commands,但看不到解决方案。
例如,我有一个将执行当前代码行的宏(无需选择它),但如果能够在执行后将光标切换回代码编辑器而无需触摸鼠标/触控板,那就太好了。
def run():
code_task = get_active_task()
code_editor = code_task.active_editor
cursor = code_editor.cursor
cursor.start_of_line()
cursor.next_line(select=True)
code_task.run_selection()
使用 Canopy 版本:Mac OS X 10.7.5 上的 1.1.1(64 位)