Ant*_*ine 14 code-completion pycharm python-3.x
我正在使用Python 3.4.
当我使用IDLE并开始输入时,例如,
my_main_folder = "C:/Us"
在编辑器窗口中,然后按Ctrl + Space
,IDLE为我提供了所有子文件夹C:
,如果我按下Tab
,字符串就完成了"C:/Users"
.
这意味着IDLE(或Python Shell)能够将字符串识别为路径.
如何让PyCharm(社区版)做到这一点?
它不能在Community Edition Pycharm中使用.但它可以在Professional Edition Pycharm中完成.我建议你转到专业版.
但是,社区版有一个解决方法.
Place caret in such place and press Alt+Enter -- see if you will have "Inject language or reference" option in appeared menu. If it's present -- use it and choose "File Reference" there.
Otherwise: select desired file in Project View panel and use "Copy Reference" -- it will copy a file path relative to the project root -- you may only need to add leading "/"...
搜索后我找到了这个答案:
can we tab through paths, in the same way you can in the terminal?
不,它不可能:(
I wrote a plugin for Komodo called AutoCode that allowed me to ALT+Click on files in the Project view, and it would automatically resolve the right path
您可以使用文件右键单击菜单中的"复制引用"将相对于项目根目录的文件路径复制到剪贴板.但遗憾的是,这一行动并未考虑资源根源
但是,您可以使用CNTRL-SPACE
两次,它将显示路径和文件列表,例如:
有关此信息的详细说明,请参见此处
归档时间: |
|
查看次数: |
480 次 |
最近记录: |