View | Tool Windows | Favorites
The Favorites tool window lets you manage the following lists:
- Favorite project items. Each list of Favorites in the tool window appears with the star icon .
- Bookmarks. The list of bookmarks is marked with icon.
- Breakpoints. The list of breakpoints is marked with icon.
Initially, the lists are empty. So doing, the favorites list has the same name as the project.
The lists of bookmarks and breakpoints are filled in automatically, as the new bookmarks or breakpoints are added.
To add items to favorites, do one of the following:
- Select one or more items in the Project tool window or the Find tool window. Then choose File | Add To Favorites.
- Right-click an editor tab, and choose or .
In this section:
- Toolbar buttons
- Context menu commands
- Title bar context menu and buttons
- Context menu of the side bar button
- Using drag-and-drop
|Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertCommand N or Control EnterControl N or Control EnterCommand N or Control Enter||Use this button to create a new list of favorite items. In the Add New Favorites List dialog, specify the name for the new list and click OK.|
|Ctrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCommand EnterCommand EnterCommand Enter||Click this button to rename the selected list.|
|Alt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteCommand DeleteCommand DeleteCommand Delete||Use this button to delete the selected list or list item.
Depending on the selection, the following behaviors take place:
Context menu commands
When you right-click an item in the content pane, the context menu for this item is shown. This menu provides access to all the functions available for the selected item.
The following table lists and explains the commands for managing the favorites lists and their contents. Other commands, functionally, are similar to those in the Project tool window.
|Rename Favorites List||Use this command to change the name of the selected list.
In the New Name For Favorites List dialog, edit the name of the list and click OK.
|Remove From Favorites||Ctrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteCtrl+DeleteControl DeleteControl DeleteControl Delete||Use this command to delete the selected list or list item.
Note that there may be list items corresponding to certain structures (for example, folders with subfolders and files inside). These may be deleted only as a whole, that is, you cannot delete their individual structural elements.
To differentiate between the list items and their structural elements (if any), you can use the path information as a visual hint. Such information is shown for favorites list items but not for their elements.
|Delete Favorites List '<list_name>'||Use this command to delete the list with the name <list_name>. As a rule, this is the list selected in the tool window.|
|Delete All User-Defined Lists Except '<list_name>'||Use this command to delete all user-defined favorites lists except the one with the name <list_name>. (The list with the name <list_name>, as a rule, is the one currently selected in the tool window.)|
|Add to Favorites||Use this command to add (i.e. copy) the selected list item to a different list.
To add the item to an existing favorites list, select the target favorites list.
To add the item to the list that does not yet exist, select Add To New Favorites List. In the Add New Favorites List dialog, specify the name of the new list and click OK. As a result, a new list is created and the selected item is added to this list.
|Send To Favorites||Use this command to move the selected list item to a different list.
To move the item to an existing favorites list, select the target favorites list.
To move the item to the list that does not yet exist, select Send To New Favorites List. In the Add New Favorites List dialog, specify the name of the new list and click OK. As a result, a new list is created and the selected item is moved to this list.
Title bar context menu and buttons
The title bar context menu provides the options for controlling the tool window viewing modes. It also contains the commands for associating the tool window with a different tool window bar, resizing and hiding the tool window.
To access the menu, right-click the window title bar.
Note that most of the menu options may alternatively be accessed by means of the title bar buttons.
|Toolbar icon||Context menu command||Description|
|Pinned, Docked, Floating, Split Mode||These options let you control general appearance and behavior of the tool window, see Viewing Modes.|
|Move to||To associate the tool window with a different tool window bar, select this command, and then select the destination tool window bar (Top, Left, Bottom or Right).|
|Resize||To resize the tool window by moving one of its borders, select this command,
and then select the necessary Stretch to option.
Note that this command is not available in the floating mode.
Shift+EscapeShift+EscapeShift+EscapeShift+EscapeShift+EscapeShift+EscapeShift+EscapeShift+EscapeShift EscapeShift EscapeShift Escape
|Hide||Use this command to hide the tool window.
When used in combination with the Alt key, clicking this button hides all the tool windows attached to the same tool window bar.
|Use this button to collapse all expanded nodes.|
Context menu of the side bar button
Right-click the side bar button to reveal this context menu. Refer to the section Viewing Modes for the detailed information about the viewing modes.
|Use this command to turn the Show Members option on or off.
If this option is on, the class members (fields, methods, etc.) are shown.
|Use this command to turn the Autoscroll to Source option on or off.
If this option is on, PyCharm automatically navigates from a file (or a class member) selected in the Favorites tool window to the corresponding source file (or its fragment) in the editor. If the corresponding file is not currently open, it will open automatically.
|Use this command to turn the Autoscroll from Source option on or off.
If this option is on, PyCharm automatically navigates from a file (or a class member) selected in the editor, to the corresponding file in the Favorites tool window.
You can use drag-and-drop to:
- Add items to favorites: drag the item of interest from the Project tool window and drop it onto the desired favorites list in the Favorites tool window.
- Drag an external item from the Explorer/Finder and drop it onto the desired favorites list in the Favorites tool window.
- Move an item from one favorites list to another in the Favorites tool window.