Webstorm mac os горячие клавиши

Configure keyboard shortcuts

WebStorm includes several predefined keymaps and lets you customize frequently used shortcuts.

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

WebStorm 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, Eclipse or NetBeans).

You cannot change predefined keymaps. When you modify any shortcut, WebStorm creates a copy of the currently selected keymap, which you can configure. Click to duplicate the selected keymap, rename, remove, or restore it to default values.

A custom keymap is not a full copy of its parent keymap. It inherits unmodified shortcuts from the parent keymap and defines only those that were changed. For information about the keymap files, see Location of user-defined keymaps.

The keymap itself is a list of actions with corresponding keyboard and mouse shortcuts, and abbreviations. To find an action by name, type it in the search field. If you know the shortcut of an action, click and press the key combination in the Find Shortcut dialog.

When consulting this page and other pages in WebStorm 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.

To view the keymap reference as PDF, choose Help | Keymap Reference from the main menu.

Add a keyboard shortcut

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Keyboard Shortcut .

In the Keyboard Shortcut dialog, press the necessary key combination.

If you want to use Enter , Escape , or Tab , click and select the necessary key or combination. Pressing them in the Keyboard Shortcut dialog will result in the actual action, such as closing the dialog.

If necessary, select the Second stroke checkbox to define a complex shortcut with two sequential key combinations.

Click OK to save the shortcut.

The key combination that you press is displayed in the Keyboard Shortcut dialog, as well as a warning if it conflicts with existing shortcuts.

Add a mouse shortcut

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Mouse Shortcut .

In the Mouse Shortcut dialog, move the mouse pointer to the central area and click or scroll as necessary.

Click OK to save the shortcut.

The performed mouse manipulations are displayed in the Mouse Shortcut dialog, as well as a warning if it conflicts with existing shortcuts.

Add an abbreviation

An abbreviation can be used to quickly find an action without a shortcut. For example, you can press Ctrl+Shift+A and type the name of the Jump to Colors and Fonts action to quickly modify the color and font settings of the element under the current caret position. If you assign an abbreviation for this action (like JCF ), you can then type it instead of the full action name.

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Abbreviation .

In the Abbreviation dialog, type the desired abbreviation and click OK .

Reset action shortcuts to default

If you changed, added, or removed a shortcut for an action, you can reset it to the initial configuration.

Читайте также:  Access windows services что это

On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Reset Shortcuts .

Location of user-defined keymaps

All user-defined keymaps are stored in separate configuration files under the keymaps subdirectory in the WebStorm configuration directory:

\keymaps Example C:\Users\JohnS\AppData\Roaming\JetBrains\WebStorm2021.2\keymaps

By default, this directory contains only the default keymaps. When you modify one of them, WebStorm actually creates a child keymap file that contains only the differences relative to the parent keymap. For example, if you modified the default Windows keymap, your custom keymap will be its child. The file will contain only the shortcuts that you added or modified, while all other shortcuts of your custom keymap will be the same as the default Windows keymap.

You can share your custom keymaps with team members or between your IDE instances. Copy the corresponding keymap file and put it in the keymaps directory on another WebStorm installation. Then select the copied keymap on the Keymap settings page.

Conflicts with global OS shortcuts

Predefined keymaps do not cover every possible platform, version, and configuration. Some shortcuts can conflict with global system actions and shortcuts for third-party software. To fix these conflicts, you can reassign or disable the conflicting shortcut.

WebStorm detects the conflicts and notifies you with a popup message. If you miss the popup, you can always view the message in the Event log tool window:

Click Modify shortcuts to open the Keymap settings dialog where you can make the necessary adjustments:

Here are a few examples of possible system shortcut conflicts with the default keymap in WebStorm. Make sure that function keys are enabled on your system.

Источник

WebStorm keyboard shortcuts

WebStorm 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.

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

Predefined keymaps do not cover every possible platform, version, and configuration. Some shortcuts can conflict with global system actions and shortcuts for third-party software. WebStorm detects the conflicts and notifies you with a popup message. To fix these conflicts, you can reassign or disable the conflicting shortcut as described in Conflicts with global OS shortcuts.

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

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

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

Launch run/debug configurations, run npm and yarn scripts, and reopen recent projects.

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.

If you are using one of the predefined keymaps for your OS, 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 | Keymap Reference .

Choose the right keymap

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

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

Use a predefined keymap

WebStorm 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, Eclipse or NetBeans).

When consulting this page and other pages in WebStorm 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.

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.

Besides the default set of keymaps, you can add more as plugins (such as, keymaps for GNOME and KDE): open the Settings/Preferences dialog Ctrl+Alt+S , select Plugins and search for keymap in the Marketplace.

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

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

Learn shortcuts as you work

WebStorm provides several possibilities to learn shortcuts:

Find Action is the most important command that enables you to search for commands and settings across all menus and tools.

Press Ctrl+Shift+A and start typing to get a list of suggested actions. Then select the necessary action and press Enter to execute it.

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 for your OS, 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 | Keymap Reference .

To print a non-default or customized keymap, use the Keymap exporter plugin.

If an action has a keyboard shortcut associated with it, the shortcut is displayed near the name of the action. To add a shortcut for an action that you use frequently (or if you want to change an existing shortcut), select it and press Alt+Enter .

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:

Refactor this Ctrl+Alt+Shift+T

VCS Operations Alt+`

WebStorm 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.

Many actions in WebStorm provide more results when you execute them multiple times. For example, when you invoke basic code completion with Ctrl+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.

Resize tool windows

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

To resize a vertical tool window, use Ctrl+Alt+Shift+Left and Ctrl+Alt+Shift+Right

To resize a horizontal tool window, use Ctrl+Alt+Shift+Up and Ctrl+Alt+Shift+Down

Источник

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

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

Все приведенные здесь сочетания клавиш — стандартные для macOS и Windows / Linux. Настроить удобные для вас сочетания клавиш можно в Preferences / Settings | Keymap.

Search Everywhere (поиск повсюду): ⇧⇧ / Shift+Shift

Если бы вы спросили нас, какое сочетание клавиш из этой статьи пригодится вам больше других, то мы бы назвали Search Everywhere. Как следует из его названия, оно позволяет искать любые файлы, действия, классы или символы по всему проекту. Все результаты поиска отображаются в одном месте.

Чтобы ограничить область поиска, перейдите на нужную вкладку или нажмите ⇥ / Tab. Кроме того, как показано на анимированном изображении ниже, прямо во всплывающем окне можно включить или отключить некоторые действия.

Show Context Actions (показать контекстные действия): ⌥↵ / Alt+Enter

WebStorm предлагает множество intention-действий, позволяющих быстро применять исправления, генерировать код и менять настройки проекта. Если код подчеркнут волнистой линией или в редакторе WebStorm появилась лампочка, можно щелкнуть по этой лампочке или переместить курсор на подчеркнутый код и нажать ⌥↵ / Alt+Enter — IDE покажет перечень доступных контекстных действий.

А как быть, если вы не хотите использовать какое-то действие или видеть предупреждения? Переместите курсор на код, нажмите ⌥↵ / Alt+Enter, а затем щелкните по стрелке рядом с инспекцией, которая вам не нужна, и отключите ее. Инспекция будет отключена во всем проекте.

Подробнее об инспекциях и о том, что с ними можно сделать, — на этой странице.

Refactor This (рефакторинг кода): ⌃T / Ctrl+Alt+Shift+T

Как и другие IDE JetBrains, WebStorm предлагает широкие возможности рефакторинга. Чтобы быстро перейти к списку доступных рефакторингов выбранного кода, нажмите ⌃T / Ctrl+Alt+Shift+T.

Go to Declaration (переход к объявлению): ⌘B or ⌘+Click / Ctrl+B or Ctrl+Click

WebStorm позволяет мгновенно перейти к объявлению символа: просто нажмите или Ctrl и щелкните на символ. Можно также поместить на него курсор и нажать ⌘B / Ctrl+B. Кроме того, это сочетание клавиш позволяет перейти к файлу, на который есть ссылка, или импортированному модулю.

Если WebStorm обнаруживает несколько возможных объявлений функции, вам будет предложено выбрать нужное из раскрывающегося списка.

Code completion with replace (автодополнение кода с заменой): ⇥ / Tab

Когда вы начинаете вводить код в WebStorm, автоматически появляется всплывающее окно автодополнения. Чтобы выбрать один из предложенных вариантов, можно просто нажать ↵ / Enter. Но если вы хотите заменить один вариант на другой, нажмите ⇥ / Tab, и вместо подставленного элемента появится выбранный.

Extend Selection (расширение области выделения): ⌥↑ / Ctrl+W

Действие Extend Selection позволяет быстро расширить область выделения, не используя мышь. Чтобы снова сузить область, используйте сочетание клавиш ⌥↓ / Shift+Ctrl+W.

Run (запуск): ⌃⌥R / Alt+Shift+F10

Самый просто способ запустить одну из конфигураций запуска проекта — нажать ⌃⌥R в macOS или Alt+Shift+F10 в Windows/Linux и выбрать нужную конфигурацию во всплывающем окне.

Подсказка: чтобы начать отладку, не запуская конфигурацию, выберите из списка конфигурацию запуска и, удерживая ⇧ / Shift, нажмите ↵ / Enter.

Expand Live Template (развернуть шаблон Live Template): ⇥ / Tab

Шаблоны Live Template экономят массу времени. Наберите короткое сокращение и нажмите ⇥ / Tab, чтобы развернуть его в код. Кроме того, WebStorm поддерживает аббревиатуры Emmet для HTML и CSS — их тоже можно развернуть с помощью сочетания клавиш ⇥ / Tab.

Чтобы перейти в шаблоне от одного заполнителя переменной к другому, еще раз нажмите ⇥ / Tab.

WebStorm включает в себя большую коллекцию шаблонов Live Template, в том числе постфиксные шаблоны. Вы также можете добавить собственные пользовательские шаблоны. Подробнее о работе с шаблонами Live Template — в этой статье в блоге.

Multiple carets (несколько курсоров): ⌥+Click / Alt+Click

Очень популярная возможность использования нескольких курсоров есть и в WebStorm. Чтобы добавить или удалить дополнительные курсоры, нажмите и удерживайте ⌥ / Alt, а затем щелкните там, куда нужно поместить следующий курсор, чтобы эти места можно было редактировать одновременно.

Подробнее о работе с несколькими курсорами — в нашей документации.

Scratch File (вспомогательный файл): ⇧⌘N / Ctrl+Alt+Shift+Insert

Вспомогательные файлы (scratch files) позволяют быстро создавать образцы кода или делать заметки по ходу работы в IDE, не затрагивая рабочие файлы проекта. Вспомогательные файлы сохраняются в IDE и доступны из любого проекта.

Другие сочетания клавиш

Интересно, что еще есть в запасе у WebStorm? О других сочетаниях клавиш можно узнать из списка горячих клавиш, доступного из главного меню IDE — Help | Keymap Reference, — или на нашем веб-сайте.

Можно также перейти в Preferences / Settings | Keymap или просто начать набирать имя действия во всплывающем окне Search Everywhere.

Надеемся, что эти сочетания клавиш помогут вам сэкономить время. Какое сочетание ваше любимое? Расскажите об этом в комментариях!

Ваша команда WebStorm
The Drive to Develop

Источник

Читайте также:  Linux passwd без проверки
Оцените статью
Shortcut Action
Double Shift