Hot Keys for Programming from OS to IDEs.

Omar Hussein
The Modern Scientist
5 min readDec 18, 2022
Photo by Glenn Carstens-Peters on Unsplash

Here are some examples of hotkeys that are commonly used for programming on Mac, Windows, and Linux:

Mac:

Photo by Patrick Ward on Unsplash
  • Command + Shift + O: Open a file
  • Command + S: Save a file
  • Command + Shift + S: Save a file as
  • Command + Shift + F: Find and replace text
  • Command + /: Comment out a line of code
  • Command + Shift + /: Comment out a block of code

Windows:

Photo by Windows on Unsplash
  • Ctrl + O: Open a file
  • Ctrl + S: Save a file
  • Ctrl + Shift + S: Save a file as
  • Ctrl + F: Find and replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code

Linux:

Photo by Gabriel Heinzer on Unsplash
  • Ctrl + O: Open a file
  • Ctrl + S: Save a file
  • Ctrl + Shift + S: Save a file as
  • Ctrl + F: Find and replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code

Note that these hotkeys may vary depending on the specific text editor or programming environment you are using.

VS Code

Photo by Clément Hélardot on Unsplash

Here are some examples of hotkeys that are commonly used for programming on Mac, Windows, and Linux:

Mac:

  • Command + Shift + O: Open a file
  • Command + S: Save a file
  • Command + Shift + S: Save a file as
  • Command + Shift + F: Find and replace text
  • Command + /: Comment out a line of code
  • Command + Shift + /: Comment out a block of code

Windows:

  • Ctrl + O: Open a file
  • Ctrl + S: Save a file
  • Ctrl + Shift + S: Save a file as
  • Ctrl + F: Find and replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code

Linux:

  • Ctrl + O: Open a file
  • Ctrl + S: Save a file
  • Ctrl + Shift + S: Save a file as
  • Ctrl + F: Find and replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code

Note that these hotkeys may vary depending on the specific text editor or programming environment you are using.

Sublime Text

Photo by Max Chen on Unsplash
  • Ctrl + Shift + P: Open the command palette
  • Ctrl + P: Quickly open a file
  • Ctrl + N: Open a new file
  • Ctrl + S: Save the current file
  • Ctrl + Shift + S: Save the current file with a different name
  • Ctrl + F: Find and replace text
  • Ctrl + H: Replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code
  • Ctrl + Shift + [ or ]: Indent or un-indent a block of code
  • Ctrl + K, Ctrl + F: Format the current file
  • F5: Run the current file
  • Ctrl + B: Build the project
  • Ctrl + Shift + B: Run the build system

Atom

Photo by Terry Vlisidis on Unsplash
  • Ctrl + Shift + P: Open the command palette
  • Ctrl + P: Quickly open a file
  • Ctrl + N: Open a new file
  • Ctrl + S: Save the current file
  • Ctrl + Shift + S: Save the current file with a different name
  • Ctrl + F: Find and replace text
  • Ctrl + H: Replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code
  • Ctrl + Shift + [ or ]: Indent or un-indent a block of code
  • Ctrl + K, Ctrl + F: Format the current file
  • F5: Run the current file
  • Ctrl + B: Build the project
  • Ctrl + Shift + B: Run the build system

PyCharm

Photo by Artem Sapegin on Unsplash
  • Ctrl + Shift + A: Find any action
  • Ctrl + N: Open a class
  • Ctrl + Shift + N: Open a file
  • Ctrl + S: Save the current file
  • Ctrl + Shift + S: Save the current file with a different name
  • Ctrl + F: Find and replace text
  • Ctrl + R: Replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code
  • Tab: Indent a block of code
  • Shift + Tab: Un-indent a block of code
  • Ctrl + Alt + L: Reformat code
  • Ctrl + Shift + F10: Run the current file
  • Ctrl + Shift + F9: Debug the current file

IntelliJ

Photo by Chris Ried on Unsplash
  • Ctrl + Shift + A: Find any action
  • Ctrl + N: Open a class
  • Ctrl + Shift + N: Open a file
  • Ctrl + S: Save the current file
  • Ctrl + Shift + S: Save the current file with a different name
  • Ctrl + F: Find and replace text
  • Ctrl + R: Replace text
  • Ctrl + /: Comment out a line of code
  • Ctrl + Shift + /: Comment out a block of code
  • Tab: Indent a block of code
  • Shift + Tab: Un-indent a block of code
  • Ctrl + Alt + L: Reformat code
  • Ctrl + Shift + F10: Run the current file
  • Ctrl + Shift + F9: Debug the current file

Note that these hotkeys may vary depending on the specific version of the text editor or integrated development environment (IDE) you are using and any custom key bindings.

--

--