Как изменить цвет в пайчарме
Перейти к содержимому

Как изменить цвет в пайчарме

  • автор:

Как изменить цвет выделения текста в Pycharm?

Вам нужно настроить свойство Selection background в настройках:

  1. Откройте окно настроек ( Ctrl + Alt + S или File → Settings или Double Shift )
  2. Зайдите в пункт меню Editor → Colors & Fonts → General и найдите пункт списка Selection background или воспользуйтесь строкой поиска:

введите описание изображения здесь

Отслеживать
ответ дан 4 апр 2015 в 15:06
4,169 1 1 золотой знак 27 27 серебряных знаков 41 41 бронзовый знак

В Settings выбираем из дерева Editor -> Colors & Fonts -> General. Меняем цвета того, что нужно

Отслеживать
ответ дан 4 апр 2015 в 15:05
2,821 2 2 золотых знака 13 13 серебряных знаков 28 28 бронзовых знаков

  • color
  • text
  • pycharm
    Важное на Мете
Похожие

Подписаться на ленту

Лента вопроса

Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.

Дизайн сайта / логотип © 2024 Stack Exchange Inc; пользовательские материалы лицензированы в соответствии с CC BY-SA . rev 2024.1.30.4069

Как изменить цвет фона редактора кода PyCharm?

Я хотел бы изменить цвет фона для редактора исходного кода PyCharm. Как мне это сделать?

Я запускаю его под Ubuntu.

Поделиться Источник 15 мая 2016 в 14:47

4 ответа

Предоставление полезного комментария @Guoliang в качестве официального ответа, так как принятый ответ не отвечает на вопрос:

Перейдите в Настройки > Редактор > Цвета и шрифты > Общие

Справа разверните Текст и выберите Текст по умолчанию

Измените Фон по желанию.

Поделиться 02 декабря 2016 в 03:58

В PyCharm 2017/2018/2019+ это:

Настройки > Редактор > Цветная схема > Общий

Затем просто разверните Text, и выберите Текст по умолчанию и установите цвет фона справа.

PyCharm

Еще один совет по теме: если вы хотите, чтобы выбранный цвет фона также использовался во всех представлениях дерева (Проект, Структура и т.д.), вы можете использовать плагин Color IDE.

И если вы хотите полностью черную среду разработки (великую для OLED-отображений), вместо Darcula-gray, посмотрите на новую тему высокой контрастности, включенную в 2018.3: https://blog.jetbrains.com/idea/2018/10/intellij-idea-2018-3-eap-high-contrast-theme-and-more-accessibility-improvements/

Поделиться 10 марта 2018 в 20:36

Сочетание клавиш для вывода стилевого меню — CTRL + ` (это обычно ключ обратной связи в разделе Esc ).

Switch menus

Он предлагает меню «Переключить» с параметрами цветовой схемы и «Посмотреть и почувствовать».

Настройка цветовой схемы управляет цветами главной панели редактора кода. Настройка «Посмотреть и почувствовать» управляет цветом для всего интерфейса (включая редактор кода, если цветовая схема используется по умолчанию).

Поделиться 27 июля 2018 в 13:52

Перейдите в Файл > Настройки > Редактор > Цветовая схема под схемами, выберите Dracula (это темный фон). Один из них также может выбрать другие в зависимости от ваших предпочтений.

Colors and fonts

As a developer, you work with a lot of text resources: the source code in the editor, search results, debugger information, console input and output, and so on. Color and font styles are used to format this text and help you better understand it at a glance.

PyCharm lets you choose between configurable color schemes that define colors and fonts used in IDE text.

Default color schemes for Python

You can use a predefined color scheme or customize it to your liking. It is also possible to share schemes.

Select a color scheme

Select the color scheme

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme .
  2. Use the Scheme list to select a color scheme.

By default, there are the following predefined color schemes:

  • Classic Light : designed for the macOS Light and Windows 10 Light interface themes
  • Darcula : designed for the Darcula interface theme
  • High Contrast : designed for the High contrast interface theme (recommended for users with sight deficiency)
  • IntelliJ Light : designed for the IntelliJ Light interface theme

If you install a plugin with a color scheme, that scheme will be added to the list of predefined schemes. For more information, refer to Share color schemes.

Customize a color scheme

You can customize a predefined color scheme, but it is recommended that you create a duplicate for your custom color and font settings:

Duplicate a color scheme

Duplicate a color scheme

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme .
  2. Select a color scheme, click , and then click Duplicate .
  3. (Optional) To rename your custom scheme, click and select Rename .

Predefined color schemes are listed in bold font. If you customize a predefined color scheme, it will be displayed in blue. To restore a predefined color scheme to default settings, click and select Restore Defaults . You cannot remove predefined color schemes.

To define color and font settings, open the Editor | Color Scheme page of the IDE settings Control+Alt+S .

Language Defaults section under Color Scheme settings

The settings under Editor | Color Scheme are separated into sections. For example, the General section defines basic editor colors, such as the gutter, line numbers, errors, warnings, popups, hints, and so on. The Language Defaults section contains common syntax highlighting settings, which are applied to all supported programming languages by default.

In most cases, it is sufficient to configure Language Defaults and make adjustments for specific languages if necessary. To change inherited color settings for an element, clear the Inherit values from checkbox.

Define custom font and color settings for Python

Highlight nested functions

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme | Python .
  2. Select any code element you want to customize and clear the corresponding Inherit values from checkbox to change inherited color settings for this element; then specify your color and font settings. For example, you can set a color highlighting for nested functions. From the list of the code elements, select Nested function definitions , clear the Inherit values from checkbox and specify the element foreground and background colors. Click OK to save the changes.

Semantic highlighting

By default, the color scheme defines syntax highlighting for reserved words and other symbols in your source code: operators, keywords, suggestions, string literals, and so on. If you have a function or method with many parameters and local variables, it may be hard to distinguish them from one another at a glance. You can use semantic highlighting to assign a different color to each parameter and local variable.

Enable semantic highlighting

Semantic highlighting

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme | Language Defaults | Semantic highlighting .
  2. Select the Semantic highlighting checkbox and customize the color ranges if necessary.

This will enable semantic highlighting for all languages that inherit this setting from Language Defaults . To enable it for a specific language instead (for example, Python), go to the Editor | Color Scheme | Python | Semantic highlighting page of the IDE settings Control+Alt+S , clear the Inherit values from checkbox, and select the Semantic highlighting checkbox.

Share color schemes

If you are used to a specific color scheme, you can export it from one installation and import it to another one. You can also share color schemes with other developers.

Export a color scheme as XML

PyCharm can save your color scheme settings as an XML file with the .icls extension. You can then import the file to another installation.

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme .
  2. From the Scheme list, select a color scheme, click , then click Export and select IntelliJ IDEA color scheme (.icls) .
  3. Specify the name and location of the file and save it.

Export a color scheme as a plugin

The plugin can be uploaded to the plugin repository for others to install. This format has several benefits over an XML file, including metadata, feedback, download statistics, and versioning (when you upload a new version of the plugin, users will be notified about it).

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme .
  2. From the Scheme list, select a color scheme, click , then click Export and select Color scheme plugin .jar .
  3. In the Create Color Scheme Plugin dialog, specify the version details and vendor information. Then click OK .

When you install a plugin with a color scheme, that scheme will be added to the list of predefined schemes.

Import a color scheme

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme .
  2. From the Scheme list, select a color scheme, click , then click Import Scheme .

Fonts

To customize the default font used in the editor, open the Editor | Font page of the IDE settings Control+Alt+S . This font is used and inherited in all color schemes by default. For more information, refer to Font.

To configure the font used in the PyCharm interface (tool windows, toolbars, menus, and so on), open the IDE settings Control+Alt+S , and go to Appearance & Behavior | Appearance . From the Use custom font list, select a font and specify the font size in the Size field.

Customize the color scheme font

You can set a different font for your current scheme.

This is not recommended if you are planning to share your scheme or use it on other platforms that may not support the selected font. In such cases, use the default global font settings.

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme | Color Scheme Font .
  2. Select the Use color scheme font instead of the default checkbox.

Customize the console font

By default, the text in the console uses the same font as the color scheme. To use a different font in the console:

  1. Press Control+Alt+S to open the IDE settings and then select Editor | Color Scheme | Console Font .
  2. Select the Use console font instead of the default checkbox.

Install a new custom font

PyCharm can use any font that is available in your operating system or in the Java runtime that is used to run PyCharm. If you want to add another font, you need to install it in your OS, and PyCharm will discover it after a restart.

    Download the desired TTF font package and unzip it to extract font files ( .ttf ). For the font to work correctly, it should have at least 4 files: Normal, Bold, Italic, and Bold Italic.

Select all font files, right-click the selection and choose Install .

Select all font files, double-click the selection to open the Font Book preview, then click Install Font at the bottom.

Unpack fonts to ~/.local/share/fonts for the current user or to /usr/share/fonts to install fonts system-wide, and then run fc-cache -f -v .

Productivity tips

See the color scheme settings for the current symbol

  • Place the caret at the desired symbol, press Control+Shift+A , find the Jump to Colors and Fonts action, and execute it.

This will open the relevant color scheme settings for the symbol under the caret.

See which fonts are currently used in the editor

  • Press Control+Shift+A , find the Show Fonts Used by Editor action, and execute it.

This will open the Fonts Used in Editor dialog with a list of fonts.

Use the quick switcher

  1. Press Control+` or select View | Quick Switch Scheme from the main menu.
  2. In the Switch popup, select Editor Color Scheme , and then select the desired color scheme.

Both the Jump to Colors and Fonts and the Show Fonts Used by Editor actions do not have a default shortcut. To assign a shortcut for an action, select it in the Find Action popup and press Alt+Enter .

Color Scheme

Use this section to select the color scheme for the PyCharm editor.

Select the color scheme to be used in your workspace.

Click this button to invoke the following commands (depending on the selected scheme):

  • Duplicate : click to save the currently selected Color settings as a new scheme. Press Enter to save the new scheme, or Escape to cancel operation.
  • Restore Defaults : click to reset the selected color scheme to the initial defaults shipped with PyCharm. Available if a predefined color scheme has been selected and changed.
  • Export : click to export the current scheme to a file. The possible options are: IntelliJ IDEA color scheme in a .icls file, or color scheme plugin jar . If the former option is selected, one should specify the target file in the Target File dialog. If the latter option is selected, then at first one should specify the plugin information in the Create Color Scheme Plug-in dialog, and next specify the target file.
  • Rename : click to rename the current scheme. This command is only available for copies or imported schemes, since the predefined schemes cannot be renamed.
  • Delete : click to delete the current scheme. This command is only available for copies or imported schemes, since the predefined schemes cannot be deleted.
  • Import Scheme : click to import a PyCharm color scheme (you can either import a file in an internal .icls format, or a jar created through the File | Manage IDE Settings | Export Settings menu), or an Eclipse color scheme in the XML format.

Next, one has to select one of the categories listed in the left-hand side (for example, Language Defaults , Python or Cucumber node) or PyCharm UI component (for example, Debugger or Diff&Merge ). In the right-hand side of the dialog (under the Scheme field), one should select an item of the respective language (for example, Keywords or Comments for the Language Defaults ) or UI component (for example, Breakpoint line for the Debugger, or Deleted lines in Diff&Merge ).

Change the selected item as required.

For more information, refer to Colors and fonts.

In the Language Defaults node, there is the setting Language Defaults | Identifiers | Function call and for Python the two settings Function call and Method call that define the difference in highlighting these calls.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *