Ctrl+K
Inline Edit: Modify selected code with natural language
These core features are the building blocks of every advanced Cursor workflow. Master these 15 tips and you’ll navigate your codebase with unprecedented speed and precision.
Memorize these fundamental shortcuts—they’re the gateway to all AI features:
Ctrl+K
Inline Edit: Modify selected code with natural language
Ctrl+I
Agent/Chat: Open AI assistant for complex tasks
Ctrl+E
Background Agent: Deploy autonomous coding assistant
Ctrl+L
Toggle Sidepanel: Quick access to chat history
Platform Note: All Ctrl
shortcuts use Cmd
on macOS
Switch contexts without losing momentum:
# Quick mode switchingCtrl+. # Open mode menuCtrl+/ # Cycle through AI modelsCtrl+Shift+J # Jump to Cursor settingsCtrl+, # General VS Code settings
Pro Workflow: Use Ctrl+.
to quickly switch between Ask mode (exploration) and Agent mode (implementation) based on your current task.
The Command Palette is your universal launcher:
Ctrl+Shift+P → Type to filter:- "Cursor: New Rule" - Create project rules- "Cursor: Start Onboarding" - Revisit setup- "Cursor: Bug Finder" - Analyze recent changes- "Cursor: Generate Commit Message" - AI commits
Ctrl+P - Quick file openCtrl+T - Symbol search across workspaceCtrl+Shift+O - Symbol search in current fileCtrl+G - Go to line number
Transform vague ideas into precise code changes:
Instead of: “Make this better” Write: “Refactor this function to handle edge cases for null inputs and add proper error logging”
Instead of: “Fix the bug” Write: “The authentication fails when the token expires. Update the middleware to refresh tokens automatically”
Pattern for Success:
Cursor maintains conversation context intelligently:
// First prompt: "Create a user authentication service"// Cursor generates basic auth service
// Follow-up: "Add password reset functionality"// Cursor understands this refers to the auth service
// Follow-up: "Now add email verification"// Builds on previous context automatically
Best Practice: Start broad, then refine with follow-ups rather than trying to specify everything upfront.
When selecting code before using Ctrl+K
, be strategic:
// Poor selection: Just the function namecalculateTotal
// Good selection: Include full function contextfunction calculateTotal(items, taxRate) { return items.reduce((sum, item) => sum + item.price, 0) * (1 + taxRate);}
// Best selection: Include usage context toofunction calculateTotal(items, taxRate) { return items.reduce((sum, item) => sum + item.price, 0) * (1 + taxRate);}
// Usageconst total = calculateTotal(cartItems, 0.08);
Navigate large projects efficiently:
# Quick file access patternsCtrl+P # Fuzzy file search@symbol # Search symbols in current file#symbol # Search symbols in workspace:42 # Go to line 42 in current filefilename:42 # Go to line 42 in specific file
Power Move: Combine searches: Ctrl+P
→ UserController#login
to jump directly to the login method in UserController.
Enable and customize breadcrumbs for complex codebases:
{ "breadcrumbs.enabled": true, "breadcrumbs.showFiles": true, "breadcrumbs.showSymbols": true, "breadcrumbs.showArrays": true, "breadcrumbs.showBooleans": true, "breadcrumbs.showClasses": true}
Click any breadcrumb segment to navigate or see siblings at that level.
Combine multi-cursor with AI for powerful edits:
# Multi-cursor shortcutsAlt+Click # Add cursorCtrl+Alt+Up/Down # Add cursor above/belowCtrl+D # Select next occurrenceCtrl+Shift+L # Select all occurrences
AI Integration: Select multiple similar code blocks with multi-cursor, then use Ctrl+K
to transform them all consistently.
Use Ctrl+K
in the terminal for natural language commands:
# Instead of remembering complex commands:git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# Just type Ctrl+K and say:"Show git history as a graph with colors"
# More examples:"List all Docker containers including stopped ones""Find all TypeScript files modified in the last week""Kill process on port 3000"
Configure terminal to maintain context across sessions:
{ "terminal.integrated.persistentSessionReviveProcess": "onExitAndWindowClose", "terminal.integrated.enablePersistentSessions": true, "terminal.integrated.shellIntegration.enabled": true}
This preserves your terminal state, making it easier for AI to understand your workflow context.
Set up your ideal workspace layout:
# View layoutsCtrl+1/2/3 # Focus editor groupsCtrl+B # Toggle sidebarCtrl+J # Toggle panel (terminal)Ctrl+Shift+E # Focus explorerCtrl+Shift+F # Focus searchCtrl+Shift+G # Focus source control
Recommended Layout:
Work with related files simultaneously:
# Split editor commandsCtrl+\ # Split editor rightCtrl+K Ctrl+\ # Split editor downAlt+Click on tab # Open in split editorCtrl+1/2/3 # Focus editor group
AI Workflow: Open implementation in left pane, tests in right pane. Use Agent mode to update both simultaneously.
Install extensions that enhance AI workflows:
GitLens
Enhanced git integration with AI-friendly blame annotations
Error Lens
Inline error display that AI can read and fix
Project Manager
Quick switching between projects with preserved context
TODO Tree
Track TODOs that AI can help complete
Install via Command Palette:
Ctrl+Shift+P → "Extensions: Install Extension" → Search by name
Ensure extensions don’t interfere with AI features:
{ // Disable auto-formatting that might conflict with AI edits "editor.formatOnSave": false, "editor.formatOnPaste": false,
// But enable for specific languages "[typescript]": { "editor.formatOnSave": true },
// Configure linters to work with AI "eslint.autoFixOnSave": false, // Let AI handle fixes "eslint.enable": true, // But still show errors}
Here’s how these core features combine in practice:
1. Ctrl+P → Open unfamiliar file2. Ctrl+Shift+O → Browse file symbols3. Ctrl+I → "Explain how this authentication flow works"4. Use breadcrumbs to navigate related files
1. Ctrl+K → Select function → "Add input validation"2. Ctrl+\ → Split to see tests3. Ctrl+I → "Update tests for new validation"4. Ctrl+K in terminal → "Run only auth tests"
1. Ctrl+Shift+G → Check git changes2. Ctrl+Shift+P → "Bug finder"3. Fix any issues with Ctrl+K4. Generate commit message with AI
To master these features, try these exercises:
Speed Navigation: Open a large project and navigate to 5 specific functions using only keyboard shortcuts. Time yourself and try to beat your record.
Natural Language Refactor: Select a complex function and refactor it using only natural language instructions. No manual typing!
Terminal Mastery: Complete 10 terminal tasks using only Ctrl+K natural language commands.
Layout Optimization: Set up your ideal layout and save it as a workspace. Practice switching between different layout presets.
Now that you’ve mastered core features, it’s time to dive deep into Tab Autocomplete - Cursor’s intelligent prediction system that can dramatically accelerate your coding speed.