Skip to main content

Can I customize shortcuts or trigger settings for Mistral Code?

Updated this week

Whether you're using the default settings and shortcuts or want to customize your own, both VS Code and JetBrains IDEs got you covered.

However, customization process might sometimes get complex depending on your IDE settings.

Let's dive into the details step-by-step:

Customizing Shortcuts Settings

In VS Code

There are various ways to customize shortcuts in VS Code, but the most straightforward way is to use the keyboard shortcuts editor:

  1. Open the Keyboard Shortcuts settings in any of the following ways:

    • Go to File > Settings... > Keyboard Shortcuts on Windows/Linux, or Code > Settings... > Keyboard Shortcuts on macOS.

    • Use the Command Palette (⌃ + ⇧ +P on Windows/Linux or ⌘ + ⇧ + P on macOS) then type: Preferences: Open Keyboard Shortcuts.

    • Use the shortcuts combination ⌃ + K ⌃ + S / ⌘ + K ⌘ + S.

  2. In the search bar, type the name of the command you want to customize if you know it (e.g., mistralCode.acceptSuggestion) or display all the Mistral Code commands by typing @ext:MistralAI.mistral-code.

  3. Double-click on the keybinding field to edit it the shortcuts directly, or click on the pencil icon next to it.

  4. Press the new key combination you want to use and then press Enter.

  5. Your changes are automatically saved and applied. You can close the editor.

📌 If you're an advanced user, you may even use the keybindings.json file to edit the shortcuts directly inside the file.

🔎 For more details on how to customize your VS Code settings, check the official documentation.

In JetBrains IDEs

JetBrains IDEs have their own way of managing keyboard shortcuts:

  1. Open the Keymap settings in any of the following ways:

    • Go to File > Settings... on Windows/Linux (or JetBrains IDE (e.g. WebStorm) > Settings... on macOS).

    • Use the Find action command (⌃ + ⇧ + A on Windows/Linux or ⌘ + ⇧ + A on macOS in the default keymap) then type: Keymap (choose Keymap (Settings)).

    • Use the shortcuts ⌃ + , / ⌘ + ,.

  2. If applicable, click on Keymap in the left sidebar.

  3. Search for Mistral Code commands by typing mistral in the search bar.

  4. Find the command you want to customize (e.g., Add selected code to context).

  5. Double-click on the shortcut field next to the command. This will open a menu where you can remove the existing shortcut or add a new one.

  6. Apply the changes by clicking OK at the bottom of the window.

🔎 To learn more about customizing your JetBrains IDE settings in details, please refer to the official documentation.

Configuring how auto-completion triggers

Mistral Code offers a flexible approach to auto-completion, whether you want it to accept suggestions quickly or be more precise in your validation, or even deactivating it entirely if needed.

In VS Code

  1. Open VS Code Settings using any of the following methods:

    • Go to File > Settings... > Settings on Windows/Linux, or Code > Settings... > Settings on macOS.

    • Use the Command Palette (⌃ + ⇧ + P on Windows/Linux or ⌘ + ⇧ + P on macOS) then type: Preferences: Open User Settings.

    • Use the shortcuts ⌃ + , / ⌘ + ,.

  2. In the search bar, type @ext:MistralAI.mistral-code to display all the Mistral Code settings.

  3. Toggle the settings you want to enable or disable, such as (and more):

    • Enable Tab Autocomplete: this setting activates or deactivates the code completions in their entirety

    • Show Inline Tip: this setting enables or disables the display of inline suggestions tooltip for precise control over the suggestions

    • Pause Tab Autocomplete On Battery: this setting enables or disables the code completions when the device is on battery power

For further control over how your auto-completion triggers, note that you can also customize the shortcuts for the following actions using the keyboard shortcuts editor as explained above with the following global (⚠️ not Mistral Code specific) commands:

  • Accept Inline Suggestion: default is (tab)

  • Accept Next Word of Inline Suggestion: default is ⌃ + ⌥ + → on Windows/Linux, ⌘ + ⌥ + → on macOS

  • Accept Next Line of Inline Suggestion: no default shortcut

📌 If you're an advanced user, you may even use the settings.json file to edit the settings directly inside the file or use VS Code advanced scoping to apply specific settings to your workspaces or folders.

🔎 To learn more about customizing your VS Code settings in details, please refer to the official documentation.

In JetBrains IDEs

Jetbrains IDEs have their own way of managing auto-completion settings:

  1. Open the Tools settings (not Plugins) in any of the following ways:

    • Go to File > Settings... (or JetBrains IDE (e.g. WebStorm) > Settings... on macOS).

    • Use the Find Action command (⌃ + ⇧ + A on Windows/Linux or ⌘ + ⇧ + A on macOS on the default keymap) then type: Mistral Code > Settings to find the settings directly.

  2. Search for Tools > Mistral Code if applicable

  3. Toggle the settings you want to enable or disable, such as (and more):

    • Enable Tab Autocomplete: this setting enables or disables the code completions

    • Enable Off-Screen Rendering: this setting enables or disables the code completions while the IDE is not focused

    • Display Editor Tooltip: this setting enables or disables the display of inline suggestions tooltip for precise control over the suggestions

  4. Apply the changes by clicking OK at the bottom of the window.

For further control over your auto-completion triggers, note that you can also customize the shortcuts for the following actions using the keyboard shortcuts editor as explained above with the following Mistral Code commands:

  • Accept Autocomplete Suggestion (default is – tab)

  • Partial Accept Autocomplete Suggestion (⌃ + ⌥ + → / ⌘ + ⌥ + →)

🔎 Need help customizing your JetBrains IDE settings in details? Check out the official documentation.

Did this answer your question?