Pycharm быстрые клавиши python

PyCharm. Горячие клавиши (hotkeys)

Горячие клавиши очень облегчают жизнь. В PyCharm они довольно много умеют.

Ctrl+Shift+A — навигация по меню, поиск команд

Tab, Shift+Tab — увеличение, уменьшение отступа выделенной области

Ctrl+J — вставка html кода

Ctrl+Tab — переключение между открытыми окнами

Ctrl+Alt+J — окружение выделенной области в html тег

Ctrl+/ — комментирование выделенной области

Ctrl+ Shift + / — многострочное комментирование выделенной области

Ctrl+N — поиск классов

Ctrl+D — дублирование строки или выделенной области

Ctrl+W, Ctrl+Shift+W — добавление выделения к указанной области и вычитание ее

Ctrl+F — поиск строки в текущем файле

Ctrl+Shift+F — поиск строки во всем проекте

Ctrl+Shift+F7 — быстрый просмотр использования выделенных символов в текущем файле

Ctrl+ —, Ctrl+ + — закрытие, открытие блоков кода

Ctrl+Q — вывод документации по выделенному элементу

Ctrl+O — переопределение базовых методов класса

Ctrl+Alt+T — окружение логической конструкцией типа try/except

Для быстрого набора HTML, CSS и XSL можете воспользоваться инструкциями пройдя по ссылке http://docs.emmet.io/cheat-sheet/

Linux

  • Файловая система Linux
  • Создание образа для восстановления системы Linux — программа PING (Partimage Is Not Ghost) — аналог ACRONIS
  • PyCharm. Горячие клавиши (hotkeys)
  • Обзор различных почтовых клиентов
  • Видео конвертер Transmageddon
  • Видео конвертер Arista Transcoder
  • Видео конвертер FF Multi Converter
  • Видео конвертер WinFF
  • Видео конвертер HandBrake
  • Конвертируем с помощью VLC Media Player
  • Обзор программы по работе со звуком Audacity
  • Веб-браузер Midori
  • Шестнадцатеричный редактор Bless
  • Текстовой редактор Bluefish
  • Как узнать версию ядра Linux и дистрибутива Ubuntu
  • Krusader — файловый менеджер, аналог Total Commander и Midnight Commander
  • Как установить проприетарные декодеры в Slimjet
  • Установка астрологической программы Zet с помощью Crossover
  • Master PDF Editor — многофункциональный PDF редактор
  • Рабочий стол XFCE
  • Установка текстового редактора Sublime Text 3 (сборки 3143) в Ubuntu или Debian
  • Как установить OpenOffice в Ubuntu, Debian, Mint
  • Технологии Snappy. Инструмент Snap
  • Утилита Flatpak
  • Создание загрузочной флешки программой Flawless
  • Как установить Python 3.8 на Ubuntu 18.04
  • Как установить Java 13 в Ubuntu и Linux Mint
  • Как установить IntelliJ IDEA в Linux
  • Русификация Firefox и перенос профиля
  • Как конвертировать DjVu в PDF в Linux

Источник

PyCharm keyboard shortcuts

PyCharm has keyboard shortcuts for most of its commands related to editing, navigation, refactoring, debugging, and other tasks. Memorizing these hotkeys can help you stay more productive by keeping your hands on the keyboard.

All default shortcuts are configurable and you can also assign shortcuts to any action that does not have them by default.

If your keyboard does not have an English layout, PyCharm may not detect all the shortcuts correctly.

The following table lists some of the most useful shortcuts to learn:

Quickly find any file, action, class, symbol, tool window, or setting in PyCharm, in your project, and in the current Git repository.

Find a command and execute it, open a tool window, or search for a setting.

Quick-fixes for highlighted errors and warnings, intention actions for improving and optimizing your code.

Jump to the next or previous highlighted error.

Select a recently opened file from the list.

Increase or decrease the scope of selection according to specific code constructs.

Comment out a line or block of code.

Show all places where a code element is used across your project.

Choose the right keymap

To view the keymap configuration, open the Settings dialog Control+Alt+S and select Keymap .

Enable function keys and check for possible conflicts with global OS shortcuts.

Use a predefined keymap

PyCharm automatically suggests a predefined keymap based on your environment. Make sure that it matches the OS you are using or select the one that matches shortcuts from another IDE or editor you are used to (for example, Emacs).

When consulting this page and other pages in PyCharm documentation, you can see keyboard shortcuts for the keymap that you use in the IDE — choose it using the selector at the top of a page.

Install a keymap from a plugin

Besides the default set of keymaps, you can install keymaps from plugins (such as, keymaps for GNOME and KDE): open the Settings dialog Control+Alt+S , select Plugins , switch to the Marketplace tab and search for keymap .

Tune your keymap

You can modify a copy of any predefined keymap to assign your own shortcuts for commands that you use frequently.

Import custom keymap

If you have a customized keymap that you are used to, you can transfer it to your installation.

If your keymap stopped working after an update, it is likely that the keymap is not available by default in the new version of PyCharm. Find this keymap as a plugin and install it on the Plugins page as described inInstall plugins.

If you prefer a hard copy, download the default PyCharm keymap reference and print it out as a card:

Learn shortcuts as you work

PyCharm provides several possibilities to learn shortcuts:

Find Action

  • PyCharm includes a built-in IDE Features Trainer. It provides interactive training courses to help you learn how to do some common tasks, such as refactoring code, navigating through projects, debugging, and working with version control. Make sure the IDE Features Trainer plugin is enabled in the Installed tab of the Plugins page in the IDE settings. To open the Learn tool window and start your exercises, select View | Tool Windows | Learn or Help | Learn IDE Features from the main menu. The tool window lists the available tutorials.
  • Find Action lets you search for commands and settings across all menus and tools. Press Control+Shift+A and start typing to get a list of suggested actions. Then select the necessary action and press Enter to execute it. To add or change the shortcut for any action, press Alt+Enter when it is selected in the list.
  • Key Promoter X is a plugin that shows a popup notification with the corresponding keyboard shortcut whenever a command is executed using the mouse. It also suggests creating a shortcut for commands that are executed frequently.
  • If you are using one of the predefined keymaps, you can print the default keymap reference card and keep it on your desk to consult it if necessary. This cheat sheet is also available under Help | Keyboard Shortcuts PDF .
  • To print a non-default or customized keymap, use the Keymap exporter plugin.

Use advanced features

You can further improve your productivity with the following useful features:

If there is a group of actions that you often use, create a quick list to access them using a custom shortcut. For example, you can try using the following predefined quick lists:

PyCharm provides a lot of typing assistance features , such as automatically adding paired tags and quotes, and detecting CamelHump words.

When the focus is on a tool window with a tree, list, or table, start typing to see matching items.

Some actions in PyCharm provide more results when you execute them multiple times. For example, when you invoke basic code completion with Control+Space on a part of a field, parameter, or variable declaration, it suggests names depending on the item type within the current scope. If you invoke it again, it will include classes available through module dependencies. When invoked for the third time in a row, the list of suggestions will include the whole project.

You can adjust the size of tool windows without a mouse:

  • To resize a vertical tool window, press Control+Alt+Shift+ArrowLeft and Control+Alt+Shift+ArrowRight
  • To resize a horizontal tool window, press Control+Alt+Shift+ArrowUp and Control+Alt+Shift+ArrowDown

Источник

10 полезных сочетаний клавиш в PyCharm

Сегодня я хочу поделиться с вами своими лайфхаками касательно работы в PyCharm, ведь мы все хотим сократить время разрабатывая проект, а в этом нам помогут быстрые команды при помощи сочетаний клавиш. Так как я предпочитаю пользоваться операционной системой семейства Windows, сочетания клавиш будут заточены под нее. Перед тем как применять данные комбинации, проследите за тем чтобы у вас стояла английская раскладка, иначе, команды будут совсем другие.

Быстрое изменение регистра

Иногда полезно быстро изменить регистр слов с верхнего на нижний, или наоборот, в этом нам поможет сочетание клавиш Ctrl + Shift + U.

Верхний регистр. Нижний регистр.

Быстрое форматирование кода по стандарту PEP 8

Скопированный код с сайта чаще всего требует форматирования, особенно это касается отступов, вручную это делать долго и нудно, поэтому существует команда Ctrl + Alt + L, она в миг исправит все ошибки форматирования в коде и расставит все по своим местам.

До форматирования.После форматирования.

Закомментировать код

Очень полезное и всеми любимое сочетание клавиш быстрого закомментирования текста, выручает, когда закомментировать часть кода чтобы избежать его выполнения Ctrl + /.

Серым цветом обозначен закомментированный текст.

Табуляция

Некоторые конструкции, например такие как if, elif, else требуют обозначения вложенности (отступов), т.е. после условия нужно отступить от левого края нажав кнопку пробел на четыре раза. Такой ввод можно заменить, нажав один раз кнопку Tab. Обратная команда Shit + Tab, убирает отступ.

Пример табуляции на третьей строчке кода.

Дублирование строки

Быстро продублировать строку поможет сочетание клавиш Ctrl + D.

Пример дублирования строк.

Перемещение блоков

Для быстрого перемещения строк или блоков используйте сочетание клавиш Ctrl + Shift + Стрелка вверх – двигает выделенный блок или строку вверх, Ctrl + Shift + Стрелка вниз – двигает выделенный блок или строку вниз.

До перемещения.После перемещения.

Выделить текущий блок

При помощи сочетания клавиш Ctrl + W, можно выделить текущий блок, если нажимать это сочетание дальше, то будут выделяться родительские блоки.

До выделения.После выделения.

Посмотреть определение методов, функций, переменных и т.п.

Если зажать Ctrl и кликнуть например на переменную, то мы попадем в блок кода где эта переменная определена.

На данном примере кликнув с зажатой клавишей Ctrl на переменную value, мы попадаем в место где она определена.

Показ последних блоков кода с которыми работали

Весьма пригодная команда, для вызова ее используйте комбинацию клавиш Ctrl + Shift + E.

Недавние блоки кода с которыми работали.

Установка и управление закладками

Для того чтобы установить закладку на строке кода, используйте сочетание клавиш Ctrl + F11, откроется меню в котором можно будет выбрать в качестве имени закладки как цифру, так и букву. Быстро установить безымянную закладку поможет клавиша F11, открыть меню с закладками можно при помощи сочетания клавиш Alt + 2.

Установка закладок с открытым меню.

А какие горячие клавиши в PyCharm знаете вы? Поделитесь ими в комментариях.

Источник

Читайте также:  Python numpy установка pycharm
Оцените статью