Becoming a power user

A “power user” or “keyboard ninja” refers to someone who uses keyboard shortcuts, advanced features and a deep understanding of an OS (operating system) to hone their workflow . While advanced features and a deep understanding of an OS don’t come quickly or easily, keyboard shortcuts are easy to find, learn and incorporate quickly. In my post I will be focusing on shortcuts in 3 distinct areas, general keyboard shortcuts for macOS, shortcuts for terminals, and shortcuts specifically for VS Code (Visual Studio Code). A quick note, These shortcuts are specific to Mac and may differ from Windows/Linux shortcuts.

E-z Cheesy macOS keyboard shortcuts

Basic Shortcuts

  • Command (⌘) + C: Copy selected text or items

  • Command (⌘) + X: Cut selected text or items

  • Command (⌘) + V: Paste copied or cut items

  • Command (⌘) + Z: Undo action

  • Command (⌘) + A: Select all items

  • Command (⌘) + F: Find specific text or symbol within a document or window

  • Command (⌘) + H: Hide front/active window

  • Command (⌘) + M: Minimize front/active window

  • Command (⌘) + O: Open selected item or open Finder to select a file

  • Command (⌘) + P: Print document

  • Command (⌘) + S: Save work

  • Command (⌘) + W: Close active window

  • Command (⌘) + Q: Quit active application

Combination Shortcuts

  • Option (⌥) + Command (⌘) + Esc: Force quit open application

  • Space bar or Fn + Down Arrow: Scroll down the page

  • Command (⌘) + Option (⌥) + M: Minimize all windows

  • Command (⌘) + Space bar: Bring up Spotlight search bar

    Creating a new keyboard shortcute To create a new keyboard shortcut, navigate to System Preferences > Keyboard > Shortcuts, click the “+” button, select the application, and type the menu title and keys you want to use.

Get Deadly with Terminal shortcuts

Navigation:

  • Ctrl-A (or Home): Move cursor to the beginning of the line.

  • Ctrl-E (or End): Move cursor to the end of the line.

  • Editing:

  • Ctrl-K (or Delete): Delete from cursor to the end of the line.

  • Ctrl-Y (or Page Up): Scroll up one page.

  • Ctrl-F (or Page Down): Scroll down one page.

Navigation

  • Cmd + (backtick): Show/Hide Terminal window

  • Ctrl + A: Go to the beginning of the line

  • Ctrl + E: Go to the end of the line

  • Option + →: Move cursor one word forward

  • Option + ←: Move cursor one word backward

  • Esc + T: Swap the last two words before the cursor

  • Esc + Backspace: Cut one word backwards using non-alphabetic characters as delimiters

Directory Management

  • pwd: Print working directory

  • ls: List directory contents

  • cd: Change directory

  • ..: Parent/enclosing directory

  • ~: Home directory

  • ! :p: Print the last command typed that starts with ‘value’

  • !!:p: Print the last command typed

File Management

  • cp: Copy file to file or directory

  • mv: Move/Rename file

  • rm: Remove file

  • pbcopy <: Copies file contents to clipboard

Core Commands

  • sudo: Run command with superuser privileges

  • top: Displays active processes (press q to quit)

Additional Tips

  • To use the Alt key as Meta key, go to Terminal Preferences > Settings Tab > Keyboard and tick “Use option as meta key”.

  • To add custom keyboard shortcuts, go to Terminal Preferences > Profile > Keyboard.

  • npm i (instead of npm install)

Very Secret VS Code shortcuts

Navigation

  • Cmd + Shift + P: Open Command Palette

  • Cmd + Tab: Navigate through open editors

  • Cmd + Shift + Tab: Navigate through open editors in reverse order

  • Cmd + Shift + F: Find in Files (search for a file or text in the current workspace)

  • Cmd + Shift + O: Open File (open a file from the current directory)

Editing

  • Cmd + D: Select next occurrence of the current selection (multi-cursor mode)

  • Cmd + Shift + D: Select all occurrences of the current selection (multi-cursor mode)

  • Cmd + Shift + /: Toggle Line Comment

  • Cmd + Shift + Alt + /: Toggle Block Comment

  • Cmd + Shift + K: Delete Line

  • Cmd + Shift + i: Format Document

  • Cmd + Space: Trigger Suggestion

Other

  • Cmd + Shift + X: Copy Current Word (copy the word under the cursor)

  • Cmd + Shift + F5: Compile and Run (compile and run the current file)

Conclusion

While advanced features and a deeper understanding of an operating system may take years of exposure and application to gain mastery over, shortcuts can be a shortcut to becoming a power user. Feel free to copy and past the above commands into your own little sticky notes to pull up and use quickly. The more you use these commands the faster your muscle memory will grow and the quicker you will be on the keyboard. In no time at all, you to can be a keyboard ninja.

0
Subscribe to my newsletter

Read articles from Justin Thomasson directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Justin Thomasson
Justin Thomasson