简体   繁体   English

如何在Pycharm项目视图中移动项目文件夹?

[英]How do I move project folders in Pycharm Project View?

I'm using Pycharm to do a few django projects and I have them all open in the Project View to the left. 我正在使用Pycharm做一些django项目,我在左边的项目视图中打开它们。 I'd like to move the project I'm currently working on to the bottom of the list to avoid confusion. 我想将我正在进行的项目移到列表的底部以避免混淆。 Pycharm does not let me do this by default. Pycharm默认不允许我这样做。 Are there some settings that need tweaking before I can do this? 在我这样做之前是否有一些需要调整的设置? Take a look at this screenshot. 看一下这个截图。 What I want to do is to be able to is to click and drag 'Django_pro' to the bottom of the list and then expand the tree. 我想要做的是能够点击并将'Django_pro'拖到列表的底部,然后展开树。 Can this be achieved? 这可以实现吗? Thank you! 谢谢!

项目视图窗口

AFAIK the display order in the file navigator panel (any of them - Project , Project Files , etc.) is not arbitrarily user-selectable. AFAIK文件导航器面板中的显示顺序(其中任何一个 - ProjectProject Files等)不是任意用户可选择的。

To avoid the confusion it would probably be a better idea to actually split your django projects into separate PyCharm projects - what you have right now is just a single PyCharm project which contains files spread across multiple directories. 为了避免混乱它很可能是一个更好的主意,实际上拆你的Django项目为单独的项目PyCharm -你有什么权利现在只是一个单一的 PyCharm项目包含在多个目录传播的文件。 The split will also save you trouble down the road by preventing potential conflicts between your projects. 通过防止项目之间的潜在冲突,拆分还可以帮助您避免麻烦。

With separate PyCharm projects there is no room for such confusion as each project is open in its own window (even when chosing to re-use the Pycharm window the existing project is closed when a new one opens). 对于单独的PyCharm项目,没有空间可以解决这个问题,因为每个项目都在自己的窗口中打开(即使在选择重新使用Pycharm窗口时,现有项目在新项目打开时关闭)。 From Opening, Reopening and Closing Projects doc section: 打开,重新打开和关闭项目文档部分:

PyCharm allows opening several projects simultaneously in different windows. PyCharm允许在不同的窗口中同时打开多个项目。 By default, each time you open a project while another one is opened, PyCharm prompts you to choose whether to open the project in the same window or in a new window. 默认情况下,每次打开项目而另一个项目打开时,PyCharm会提示您选择是在同一窗口还是在新窗口中打开项目。 If necessary, you can change this behavior using controls on the System Settings page. 如有必要,可以使用“系统设置”页面上的控件更改此行为。

In the Project Opening section of this page, you can choose one of the following options: 在本页的“ 项目开始”部分中,您可以选择以下选项之一:

  • Open project in a new window to open a new PyCharm window each time a new project is opened. 每次打开一个新项目时,在新窗口中打开项目以打开一个新的PyCharm窗口。
  • Open project in the same window to stay in the same PyCharm window. 在同一个窗口中打开项目以保持在同一个PyCharm窗口中。
  • Confirm window to open project in to keep the default behavior and display a dialog box to choose how to open each new project. 确认窗口以打开项目以保持默认行为并显示一个对话框以选择如何打开每个新项目。

You might want to scan through the entire Creating and Managing Projects chapter and/or the Creating and managing Django project tutorial. 您可能希望浏览整个“ 创建和管理项目”一章和/或“ 创建和管理Django项目”教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM