Skip to content

Instantly share code, notes, and snippets.

@joeyvandijk
Last active May 4, 2023 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyvandijk/576aa94a0da08f2798e7 to your computer and use it in GitHub Desktop.
Save joeyvandijk/576aa94a0da08f2798e7 to your computer and use it in GitHub Desktop.

Apple OSX

  • CMD + CTRL + SPACEBAR --- show emoji
  • CTRL + ALT + SHIFT + V --- paste without formatting
  • ⌃ + ⌘ + ⇧ + 4 --- allows you to take a screenshot and save it to your clipboard
  • CMD + SHIFT + / --- open help section of any app that has a help menu-item
  • Terminal
    • CTRL + U --- remove everything on this line
    • CTRL + R --- reverse search for specific string
    • CMD + double-click --- click on url to open in default browser
  • Finder
    • make aliasses (easier to backup) --- ALT + CMD + drag outside window then rename and paste in correct folder
    • Shift + Option then click a column and drag - all columns share the same width
    • open PNG (in preview), select and copy, then paste on CMD+I on folder --- change folder icon

Apple XCode

  • CMD + CTRL + Z --- options window

Google Chrome

  • CMD + SHIFT + M + arrow keys to switch between profiles

Google Chrome Devtools

  • CMD + ] or CMD + [ --- switch between tabs
  • CMD + O or CMD + P --- search for file
  • F2 --- edit selected HTML node directly
  • ENTER --- edit selected HTML node attribute directly
  • H --- hide HTML element
  • Timeline > CMD + E --- start and stop capturing process
  • Profiler
    • F8 or CMD + \ --- Pause / resume script execution
    • F10 or CMD + ' --- Step over next function call
    • F11 or CMD + ; --- Step into next function call
    • SHIFT + F11 or SHIFT + CMD + ; --- Step out of current function call
  • Console
    • $0 in console --- show current selected element
    • console.time('identifier') and console.timeEnd('identifier') will be shown inside chrome://tracing

More info at Devtools Cheatsheet

Things

  • iOS (keyboard shortcuts)
    • CMD + N --- new todo
    • CMD + / --- hide/show sidebar
    • CMD + 1,2,3,4,5,6 --- switch between all major categories like Today, Inbox, Upcoming, etc

VS Code

Tips, keyboard shortcuts and git config diff.lfs.textconv cat to support diff-ing images inside VS Code.

  • CTRL + OPTION + DOWN/UP --- copy line
  • CTRL + DOWN/UP --- move line up/down
  • CTRL + SHIFT + F --- beautify file
  • CTRL + SHIFT + T --- open last file
  • CTRL + R --- switch workspace(s / folders)
  • CMD + P --- find file + twice after each other opens last opened file
  • CMD + T --- (added) toggle Terminal
  • CMD + 0 --- focus on sidebar
  • CMD + = + - --- reset zoom
  • CMD + SHIFT + P --- list of actions to execute
  • CMD + SHIFT + K --- delete line
  • CMD + SHIFT + F --- search in all files with a filter
  • CMD + SHIFT + E --- go to the explorer view
  • CMD + 1 or CMD + 2 or CMD + 3 --- redirects you to the right split editor
  • CTRL + SHIFT + G --- go to git status view
  • CTRL + backslash --- open inline terminal
  • CMD + D --- select current work or next iteration of that word
  • CMD + K and CMD + D --- skip this iteration and proceed to the next one
  • CMD + J --- toggle terminal panel
  • CTRL + SHIFT + ' --- open terminal
  • OPTION + ' --- open sub-terminal
  • OPTION + SHIFT + O --- organize / cleanup imports
  • OPTION + G + P --- drop latest stash
  • OPTION + G + A --- amend staged files
  • OPTION + G + S --- stash staged files
  • OPTION + G + D --- apply a specific stash

Webstorm

Use live templates for code you use often!

  • Languages & Frameworks > Javascript > Libraries --- adjust the autocomplete options
  • CTRL + ALT + R --- run your configurations
  • ALT + F12 - open Terminal inside Webstorm
  • CTRL + SPACE inside package.json on a dependency version number - show latest package version
  • introspection
    • CMD + P --- see information on function or method parameters
  • autocomplete
    • TAB --- code completion or execute template
    • CTRL + SPACEBAR --- code completion
  • current file
    • CMD + D --- duplicate this line
    • ALT + UP / DOWN --- extend / minimize selection
    • ALT + SHIFT + UP / DOWN --- move line up/down
    • CTRL + T --- refactor this
    • CMD + ALT + L --- refactor code like in code style
  • search
    • CTRL + ; --- acejump with a character to a line
    • CTRL + P --- find next occurrence of selected text
    • CMD + F12 --- tree-like representation of your current file
    • CMD + SHIFT + O --- open file
    • CMD + SHIFT + F --- find in path
    • CMD + SHIFT + A --- search for action
    • SHIFT + SHIFT --- search everywhere in your project
    • OPTION + F7 --- find usages of a function in your project
  • Git
    • CTRL + ALT + F --- git fetch
    • CTRL + ALT + P --- git pull
    • CTRL + ALT + S or CMD + SHIFT + K --- git push
    • CTRL + ALT + T --- git tag
    • CTRL + ALT + L --- git log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment