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
(orHome
): Move cursor to the beginning of the line.Ctrl-E
(orEnd
): Move cursor to the end of the line.Editing:
Ctrl-K
(orDelete
): Delete from cursor to the end of the line.Ctrl-Y
(orPage Up
): Scroll up one page.Ctrl-F
(orPage Down
): Scroll down one page.
Navigation
Cmd +
(backtick): Show/Hide Terminal windowCtrl + A
: Go to the beginning of the lineCtrl + E
: Go to the end of the lineOption + →
: Move cursor one word forwardOption + ←
: Move cursor one word backwardEsc + T
: Swap the last two words before the cursorEsc + Backspace
: Cut one word backwards using non-alphabetic characters as delimiters
Directory Management
pwd
: Print working directoryls
: List directory contentscd
: 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 directorymv
: Move/Rename filerm
: Remove filepbcopy <
: Copies file contents to clipboard
Core Commands
sudo
: Run command with superuser privilegestop
: Displays active processes (pressq
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 PaletteCmd + Tab
: Navigate through open editorsCmd + Shift + Tab
: Navigate through open editors in reverse orderCmd + 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 CommentCmd + Shift + Alt + /
: Toggle Block CommentCmd + Shift + K
: Delete LineCmd + Shift + i
: Format DocumentCmd + 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.
Subscribe to my newsletter
Read articles from Justin Thomasson directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by