Skip to content

Instantly share code, notes, and snippets.

@umidjons
Last active July 26, 2022 11:11
Show Gist options
  • Save umidjons/9383758 to your computer and use it in GitHub Desktop.
Save umidjons/9383758 to your computer and use it in GitHub Desktop.
PhpStorm: Record Auto semicolon macro and bind shortcut to it
Record Auto semicolon macro and bind shortcut to it:
1. Edit -> Macros -> Start Macro Recording
2. In the editor go to the end of line by pressing End
3. put semicolon ';'
4. Edit -> Macros -> Stop Macro Recording
5. Give a name, for example 'Auto semicolon'
6. Open settings (Ctrl + Alt + s), select Keymap
7. Expand Macros node
8. Select 'Auto semicolon', in the context menu choose Add Keyboard Shortcut
9. Set Ctrl + ; as First keystroke
10. Save/Apply settings
11. Enjoy!
12. Try it so, in the middle of code line, hit Ctrl + ;
// some useful combinations:
Ctrl + , put colon at the end of line
Ctrl + ; put semicolon at the end of line
Ctrl + . put => at the end of line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment