Basic use of Pycharm

Basic use of Pycharm

 

1. Basic use
of Pycharm 1. Configure the Python interpreter for your Python project under Pycharm

1. Project: Current project name>Project Interpreter>add Local

  1. Create Python files and Python modules under Pycharm

    1. File>New>Python File

    2. File>New>Python Package

  2. Install Python third-party modules with Pycharm

1. Project: Current project name>Project Interpreter>Click the small green plus sign on the right

  1. Pycharm basic settings, such as no tab, tab=4 spaces, font, font color, theme, footer

    This header setting, display line number, etc. How to export and import custom settings.

    1. Set menu font size: Appearance&Behavior>Appearance

    2. Set Console&Terminal font size: Editor>Colors&Fonts>Console Font

    3. Set file encoding: Editor>File Encodings IDE Encoding; Project

      Encoding; Properties Files are all set to UTF-8

    4. Modify the background color: Settings>Editor>Color&Fonts>General>under Text on the right

      Select Default text>Modify Background color

    5. Do not use tab, tab=4 spaces: Editor>Code Style>Python

    6. Font, font color: Edit>Colors & Fonts>Python

    7. Turn off automatic updates: Appearance & Behavior>System Settings>Updates

    8. Script header setting: Edit>File and Code Templates>Python Script Note: Other

      similar

    9. Show line numbers: Edit>General>Appearance>Show line numbers Note:

      2016.2 default display line number

    10. The vertical bar on the right is the code specification of PEP8, and it is suggested that a line should not exceed 120 characters
    . 11. Export and import your custom configuration: File>Export Settings, Import Settings

  2. Common shortcut keys, such as copy current line, delete current line, batch comment, indent, find and replace. 1. Query and configuration of common shortcut keys: Keymap

    1. Ctrl + D: Duplicate the current line

    2. Ctrl + E: delete the current line

    3. Shift + Enter: fast line break

    4. Ctrl + /: Quick comment (can batch comment after selecting multiple lines)

    5. Tab: Indent the current line (multiple lines can be indented in batches)

    6. Shift + Tab: Cancel indentation (can cancel indentation in batches after selecting multiple lines)

    7. Ctrl + F: Find

    8. Ctrl + H: replace

    9. Ctrl + Minus: Collapse the current code block

    10. Ctrl + Shift + Minus: Collapse the current file

    2. Set shortcut keys
    1. Set shortcut keys to modify font size

  3. Pycharm installs plugins, such as Markdown support, database support plugins, etc.

    1. Plugins>Browse repositories (the one in the middle of the three buttons below)>Search

      ‘markdown support’>install

    2. There are three options for View in the upper right corner. Generally, we use the left side in the middle to write, and the right side is real.

      preview

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325102295&siteId=291194637