Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
Last active May 5, 2025 07:22
Show Gist options
  • Save pesterhazy/c9ea858a6bc3cd3c8558d5e20b701f3d to your computer and use it in GitHub Desktop.
Save pesterhazy/c9ea858a6bc3cd3c8558d5e20b701f3d to your computer and use it in GitHub Desktop.
Cursor (VS Code) Cheat Sheet

All keybindings for macOS

Getting around

  • Select successively larger and larger sections (word, block, function), expanding upward and outward (Ctrl Shift Right)
  • Go back to the file and position where you last edited (Go to Last Edit Location): (Cmd R Cmd Q)
  • Go to last file: Cmd P P (keep Cmd pressed down)

Cursor's AI features

  • Cmd-P >Toggle Cursor Tab - turn off Cursor's AI suggestions when they get in the way

Sidebar

  • Show/hide sidebar: Cmd B
  • File: Reveal Active File in Explorer View

Navigation

  • Cmd-P #getAccount - find getAccount symbol in codebase
  • Shift-F12 - cycles through all references

Refactoring / Automatic Edits

  • Move to file: Cmd-., then select "Move to file"
  • Add import: Cmd-., then select "Add import/update import"
  • Rename symbol: F2
  • Extract method/Extract constant: Select code to extract, then Cmd-., then select appropriate action

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment