==========================================================================
- 字体设置(Alt+Ctrl+S > Editor > Colors & Fonts > Font)
a. Scheme:Darcula
b. Primary Font: Consolas
c. Size:14
========================================================================== - 在文件查找替换:Ctrl + R
缩进、取消缩:Tab、Shift + Tab
==========================================================================
- Ctrl + N:查找class
- Ctrl + Space:自动填充
- Ctrl + Space (twice):自动填充,补全import语句
- Alt + F7 :Find Usage
- Ctrl+Q: (View | Quick Documentation).
- To navigate to the declaration of a class, method or variable used somewhere in the code, position the caret at the usage and press Ctrl+B. You can also click the mouse on usages with the Ctrl key pressed to jump to declarations.
- You can quickly navigate in the currently edited file with Ctrl+F12 (Navigate | File Structure).
It shows the list of members of the current class. Select an element you want to navigate to and press the Enter key or the F4 key.
To easily locate an item in the list, just start typing its name. - You can easily rename your local variables with automatic correction of all places where they are used.
To try it, place the caret at the variable you want to rename, and press Shift+F6 (Refactor | Rename). Type the new name in the popup window that appears, or select one of the suggested names, and press Enter. - When using Code Completion, you can accept the currently highlighted selection in the popup list with Tab key.
Unlike accepting with the Enter key, the selected name will overwrite the rest of the name to the right of the caret. This can be especially useful for replacing one method or variable name with another. - Did you know that you can close tabs in the editor and the tool windows of PyCharm without actually using the context menu commands? It is enough to point with your mouse cursor to a tab to be closed, and click the middle mouse button, or just use the Shift+click combination.
- To quickly select the currently edited element (class, file, method or field) in any view (Project view, Structure view or other), press Alt+F1.
- The speed search is available in all the tree views: just start typing and you'll quickly locate the necessary item.
- The Esc key in any tool window moves the focus to the editor.
Shift+Esc moves the focus to the editor and also hides the current (or last active) tool window.
The F12 key moves the focus from the editor to the last focused tool window. - Ctrl+W (extend selection) in the editor selects the word at the caret and then selects expanding areas of the source code. For example, it may select a method name, then the expression that calls this method, then the whole statement, then the containing block, etc. You can also select the word at the caret and the expanding areas of the source code by double-clicking the target areas in the editor.
- The Extract Variable refactoring helps you simplify complicated statements in your code. For example, in the code fragment below, you can select an expression in the code, and press Ctrl+Alt+V (Refactor | Extract | Variable).
- Ctrl+D in the editor duplicates the selected block or the current line when no block is selected.
- The Code | Move Statement Up/Down action is useful for reorganizing the code lines in your file, e.g., for bringing a variable declaration closer to the variable usage.
For example, select a code fragment and press Ctrl+Shift+向上箭头 or Ctrl+Shift+向下箭头. - The Ctrl+Shift+J shortcut joins two lines into one and removes unnecessary spaces to match your code style.
- If the cursor is between the parentheses of a method call, pressing Ctrl+P brings up a list of valid parameters.
- Ctrl+Shift+Backspace (Navigate | Last Edit Location) brings you back to the last place where you made changes in the code.
Pressing Ctrl+Shift+Backspace a few times moves you deeper into your changes history. - Use Ctrl+Shift+F7 (Edit | Find | Highlight Usages in File) to quickly highlight usages of some variable in the current file.
Use F3 and Shift+F3 keys to navigate through highlighted usages.
Press Esc to remove highlighting. - To see your local history of changes in a file, invoke Local History | Show History from the context menu. You can navigate through different file versions, see the differences and roll back to any previous version.
Use the same context menu item to see the history of changes on a directory. You will never lose any code with this feature! - Ctrl+E (View | Recent Files) brings a popup list of the recently visited files. Choose the desired file and press Enter to open it.
- To show separator lines between methods in the editor, open the editor settings and select the Show method separators check box in the Appearance page.
- When using basic code completion (Ctrl+空格), type any characters that exist anywhere in an identifier.
- Use Alt+向上箭头 and Alt+向下箭头 keys to quickly move between methods in the editor.
- Use the Ctrl+Shift+V shortcut to choose and insert recent clipboard contents into the text.
- The shortcuts such as Ctrl+Q (View | Quick Documentation), Ctrl+P (View | Parameter Info), Ctrl+B (Navigate | Declaration) and others can be used not only in the editor but in the code completion popup list as well.
- You can easily override the methods of the base class by pressing Ctrl+O (Code | Override Methods).
- To help you learn the purpose of each item in the main menu, its short description is shown in the status bar at the bottom of the application frame when you position the mouse pointer over this item.
- To open any particular method or field in the editor quickly, press Ctrl+Alt+Shift+N (Navigate | Symbol) and start typing its name.
Choose symbol from the drop-down list that appears. - Use Alt+Shift+C to quickly review your recent changes to the project.
- Use Basic Completion (Ctrl+空格) within HTML, CSS and other files, for completing image file names.
- With a single keystroke, you can apply another code style/coloring scheme or keymap right from the editor. Just press Ctrl+后引号 (View | Quick Switch Scheme), to specify the scheme you want to change.
- When in the Go to Class, Go to Symbol, or Go to File popup, you can ease the search by filtering the lookup list with the help of the "camel words" prefixes.
*B You can easily make column selection by dragging your mouse pointer while keeping the Alt key pressed.