AI Integration ChatGPT Knocking Code Magic Copilot

Time:2024-1-9

preamble

This article is mainly AI tool Copilot interpretation of the article, if there is any need to improve the place also please point out the big brother AI Integration ChatGPT Knocking Code Magic Copilot

catalogs


1. What is Copilot

Copilot (https://copilot.github.com/) is an AI coding aid powered by Github that provides coding advice based on AI learning during the coding process. In many cases, Copilot can instance complete code with just comments or function names. Copilot is not yet fully open and you need to apply for permission to open it. Visit its official websitehttps://copilot.github.com/To apply for the license, click the “Sign up” button. Once you have signed up, you can use Copilot on Github. AI Integration ChatGPT Knocking Code Magic Copilot

2. Idea Installation Copilot

Requirement: Idea version should be no less than 2021.2Otherwise, the Copilot plugin cannot be searched. AI Integration ChatGPT Knocking Code Magic Copilot After restarting the idea it is ready to use

3. Idea to use Copilot

After installing and rebooting, click tools->Copilot and log in to gitHub to get access to it. AI Integration ChatGPT Knocking Code Magic Copilot AI Integration ChatGPT Knocking Code Magic Copilot strike (on the keyboard)Cop and Open AI Integration ChatGPT Knocking Code Magic Copilot Copy the device code here for authorization AI Integration ChatGPT Knocking Code Magic Copilot AI Integration ChatGPT Knocking Code Magic Copilot

3.1 Code Completion

Copilot completes the entire line and automatically fills it with the parameter AI Integration ChatGPT Knocking Code Magic Copilot Copilot also automatically recognizes the workbook variable and its getSheetAt method as it appears in the above article, with no problems with syntax errors. AI Integration ChatGPT Knocking Code Magic Copilot Although the complementation worked better in the previous example and there were no problems with syntax errors, Copilot still generates code snippets with syntax errors in many cases. As shown in the figure below, the StringUtils class is created in the local project, and there is only one readTestFile method under the class, yet Copilot generates the print method because Copilot learns from hundreds of millions of open source code and can’t learn the code information of the local project in a timely manner, so essentially like TabNine it is There will be syntax error problems, just that the probability of error is smaller because the model is more powerful, but once the local engineering code is involved, the probability of error will be very high. AI Integration ChatGPT Knocking Code Magic Copilot

4. Shortcut Keys

Copilot also provides some shortcuts that can be easily used.

JetBrains IDE

Keyboard shortcuts for macOS
act shortcuts
Acceptance of inreach recommendations Tab
Rejection of inline recommendations Esc
Show next inline suggestions Option (⌥) or Alt+]
Show last inline suggestion Option (⌥) or Alt+[
Trigger inline recommendations Option (⌥)+\
Open GitHub Copilot (other suggestions in a separate pane) Option (⌥) or Alt+Return
Keyboard Shortcuts for Windows
act shortcuts
Acceptance of inreach recommendations Tab
Rejection of inline recommendations Esc
Show next inline suggestions Alt+]
Show last inline suggestion Alt+[
Trigger inline recommendations Alt+\
Open GitHub Copilot (other suggestions in a separate pane) Alt+Enter
Keyboard Shortcuts for Linux
act shortcuts
Acceptance of inreach recommendations Tab
Rejection of inline recommendations Esc
Show next inline suggestions Alt+]
Show last inline suggestion Alt+[
Trigger inline recommendations Alt+\
Open GitHub Copilot (other suggestions in a separate pane) Alt+Enter

Visual Studio Code IDE

Keyboard shortcuts for macOS
act shortcuts command name
Acceptance of inreach recommendations Tab MIT editor. Action.inlineSuggest.com
Rejection of inline recommendations Esc editor.action.inlineSuggest.hide
Show next inline suggestions Option (⌥)+] editor.action.inlineSuggest.showNext
Show last inline suggestion Option (⌥)+[ editor.action.inlineSuggest.showPrevious
Trigger inline recommendations Option (⌥)+\ Editor. Action. InlineSuggest. The trigger
Open GitHub Copilot (other suggestions in a separate pane) Ctrl+Return github.copilot.generate
Turning GitHub Copilot on/off No default shortcut github.copilot.toggleCopilot
Keyboard Shortcuts for Windows
act shortcuts command name
Acceptance of inreach recommendations Tab MIT editor. Action.inlineSuggest.com
Rejection of inline recommendations Esc editor.action.inlineSuggest.hide
Show next inline suggestions Alt+] editor.action.inlineSuggest.showNext
Show last inline suggestion Alt+[ editor.action.inlineSuggest.showPrevious
Trigger inline recommendations Alt+\ Editor. Action. InlineSuggest. The trigger
Open GitHub Copilot (other suggestions in a separate pane) Ctrl+Enter github.copilot.generate
Turning GitHub Copilot on/off No default shortcut github.copilot.toggleCopilot
Keyboard Shortcuts for Linux
act shortcuts command name
Acceptance of inreach recommendations Tab MIT editor. Action.inlineSuggest.com
Rejection of inline recommendations Esc editor.action.inlineSuggest.hide
Show next inline suggestions Alt+] editor.action.inlineSuggest.showNext
Show last inline suggestion Alt+[ editor.action.inlineSuggest.showPrevious
Trigger inline recommendations Alt+\ Editor. Action. InlineSuggest. The trigger
Open GitHub Copilot (other suggestions in a separate pane) Ctrl+Enter github.copilot.generate
Turning GitHub Copilot on/off No default shortcut github.copilot.toggleCopilot

5. Other intelligent code completion tools

TabNine supports the widest variety of languages and IDEs, and has a high memory footprint in native mode;
AliCloud Cosy's code search function is more practical and can be used with other tools;
Kite is only for Python developers, and the complement is not really amazing;
Codota is no longer maintained and can be disregarded;
IntelliCode is not very practical and might be integrated with GitHub Copilot in the future;
AIXcoder is middling and lacks flair;

Recommended Today

Resolved the Java. SQL. SQLNonTransientConnectionException: Could not create connection to the database server abnormal correctly solved

Resolved Java. SQL. SQLNonTransientConnectionException: Could not create connection to the database server abnormal correct solution, kiss measuring effective!!!!!! Article Catalog report an error problemSolutionscureexchanges report an error problem java.sql.SQLNonTransientConnectionException:Could not create connection to database server Solutions The error “java.sql.SQLNonTransientConnectionException:Could not create connection to database server” is usually caused by an inability to connect to the […]